We understand that storage space is a huge concern in the world. For the approximately four billion people with low-bandwidth connections, it is difficult to send large video files in a small amount of time. We wanted to provide a novel, yet efficient solution for compressing videos.

What it does

  • Submit a video file
  • Converts it to ASCII text using Computer Vision with OpenCV
  • You can view the compressed ASCII file as a video
  • Submit a ByteSize’d text file
  • Converts it back to mp4 video using Machine Learning with PyTorch
  • Can re-add color to images (from absolutely zero color data in the text)

In the end, our compression algorithm halves the size of an equivalent .MP4 file.

How we built it

  • Front-end
    • React
    • Next.js
    • TailwindCSS
  • Back-end
    • Python
    • Flask for API
    • AWS S3
  • Machine Learning
    • Python
    • Torch
    • OpenCV
    • NumPy

Challenges we ran into

Each of us have fairly distinct Computer Science skill sets which made collaboration fun but challenging at times. Installing python libraries and figuring out how to get Torch and CUDA working was a pain. Connecting the front-end, back-end, and machine learning models together was especially challenging.

ML in our model

For our ML application, we used a wide variety of sources to achieve the many features in our project. FIrst, we experimented with bicubic interpolation, after generating a pixel file based on ascii encoded brightness in black and white. This allowed a slightly blurry, but less pixelated file to be created. From there we utilized a pretrained SRGAN model in order to create a super resolution version of our model, which is the basis of our upscaling and interpolation that allows us to create quality images from mere ascii text. The SRGAN model utilizes a CNN neural network with a custom fit 8 conv2d layers we modified for the task. Moreover, we utilized a color interpolation software that allows this super resolution image to become colored for minimal time. At 1 frame per second, it has room for improvement, but for a 24 hackathon we say a job well done! Moreover, we also have a functionality that can double the framerate of the video for a mere 25% increase in space.

Accomplishments that we're proud of

Very proud of everyone for stepping outside their comfort zones. The collaboration went extremely well and we were honestly surprised we were able to get as complete a final product as we did. The machine learning model we trained ended up being way better than we could have imagined (especially the color inferring WOW!) and we are very proud to have developed this novel yet useful compression format.

Also, our logo is AMAZING and was designed by Li. There are so many levels to it! It's an angler fish ready to take BITE of something. But from the other side, it's also a CAMERA with a BITE taken out of it!

What we learned

We all learned a lot about front-end design and machine learning. Making every component of the project work together was also a challenging but rewarding task.

What's next for ByteSize

We would definitely like to continue improving our Machine Learning model to decrease compressed file sizes and increase uncompressed resolution and accuracy. Currently, the model was trained for less than 24 hours. If we trained it for weeks or even months, we would approach a near lossless file compression algorithm.

Share this project: