Answers.Body: <p>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. </p>
  
  <p>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. </p>
  
  <p>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 <a href="https://medium.com/@jannik.zuern/but-what-is-an-autoencoder-26ec3386a2af" rel="nofollow noreferrer">medium</a>,<a href="https://blog.keras.io/building-autoencoders-in-keras.html" rel="nofollow noreferrer">keras example</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T16:05:23.637Z
Answers.Text: 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....
Answers.UserDisplayName: neel g
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T14:12:49.623Z
Answers.LastActivityDate: 2020-04-21T14:12:49.623Z
Answers.UserDisplayName: Paul Higazi
Answers.Body: <p>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:</p>
  <ol>
  <li><p>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.</p>
  </li>
  <li><p>The encoder is half part of the autoencoder, so the compression is faster than training the whole autoencoder.</p>
  </li>
  <li><p>Use GPU! It really makes much different!</p>
  </li>
  <li><p>Try Google Colab! You can choose between CPU and GPU and then make a decision.</p>
  </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-19T20:54:42.243Z
Answers.LastActivityDate: 2020-09-22T06:30:28.350Z
Answers.LastEditDate: 2020-09-22T06:30:28.350Z
Answers.UserDisplayName: kiarash_kiani
Body: <p>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:-      </p>
  
  <ol>
  <li>How fast are autoencoders? I need something to <em>compress</em> an image in milliseconds?</li>
  <li>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)?    </li>
  </ol>
  
  <p>Do you know of any particularly new and interesting research in AI that has enabled a technique to this fast and efficiently?</p>
  
Tags: <autoencoders><image-processing>
Title: How fast are autoencoders?
UserDisplayName: neel g
ThreadText: # How fast are autoencoders?
  
  (Asked by: username_0 on 2020-04-21)
  
  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?
  
  **Tags:** autoencoders, image-processing
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-04-21. Score: 1
  
  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](https://medium.com/@jannik.zuern/but-what-is-an-autoencoder-26ec3386a2af),[keras example](https://blog.keras.io/building-autoencoders-in-keras.html)
  
  > **Comments:**
  > **username_0**: 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....  
  
  ---
  
  ### Answer by username_2 on 2020-09-19. Score: 0
  
  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.
  
  
  ---
  
  