1
$\begingroup$

I was exploring image/video compression using Machine Learning. In there I discovered that autoencoders are used very frequently for this sort of thing. So I wanted to enquire:-

  1. How fast are autoencoders? I need something to compress an image in milliseconds?
  2. How much resources do they take? I am not talking about the training part but rather the deployment part. Could it work fast enough to compress a video on a Mi phone (like note8 maybe)?

Do you know of any particularly new and interesting research in AI that has enabled a technique to this fast and efficiently?

$\endgroup$

2 Answers 2

1
$\begingroup$

Actually it depends on the size of your AE, if you use a small AE with just 500.000 to 1M weigths, the inferencing can be stunningly fast. But even large networks can run very fast, using Tensorflow lite for example, models are compressed and optimized to run faster on Edge-devices (Handys for example, end-user devices). You can find a lot of videos on Youtube, where people test inferencing large networks like Resnet-51 or Resnet-101 on a raspberrypi, or other SOC Chips. Handys are comparable to that, but maybe not that optimized.

For example,I have an Jetson Nano (SOC of Nvidia costs arround 100 euro) and i tried to inference a large Resnet with arround 30 million parameters over my fullHD Webcam. Stable 30 FPS, so speaking in milliseconds its around 33 ms per image.

To answer your question, yes Autoencoders can be fast, also very fast in combination with an optimized model and hardware. Autoencoder structures are quite easy, check out this medium,keras example

$\endgroup$
1
  • $\begingroup$ Well, I will be testing it out. But my assumption is that the encoder is able to compress at least a single image in milliseconds, so as to process a continuous stream of video. Is that idea viable, or too much to hope for? Maybe the autoencoder might take more time for mobile devices.... $\endgroup$
    – neel g
    Apr 21, 2020 at 16:05
0
$\begingroup$

It depends on your image size and the size of the compression you want! Usually deep learning algorithms are not so fast as why they run on GPU, and we have highly optimized frameworks like TensorFlow! Something I can say for sure is:

  1. Compressing video using autoencoders means compressing each frame one by one! However, video compressions usually contain the calculation of the deference of every frame with the previous frame. This means the compressing video is much more time consuming than compressing just a single image.

  2. The encoder is half part of the autoencoder, so the compression is faster than training the whole autoencoder.

  3. Use GPU! It really makes much different!

  4. Try Google Colab! You can choose between CPU and GPU and then make a decision.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .