Body: <p>I am working in the field of Machine Vision, where accuracy and performance both play a major factor in deciding the approach towards a problem. Traditional rule based approaches work quite well in such cases.</p>
  
  <p>I am gradually migrating towards deep learning, due to its umpteen advantages, where the results seem promising albeit with two huge caveats:</p>
  
  <ol>
  <li><p>Lack of Training data in this field. To be precise, the lack of erroneous data.</p></li>
  <li><p>Performance issues on inference. Accuracy and speed are required in equal proportion, and cannot be compromised.</p></li>
  </ol>
  
  <p>In industrial settings, Point 1 plays a strong factor. I have been dabbling with Transfer learning techniques and using pre-trained models to overcome this situation. For simpler applications such as classification, this suits and gives good results. In other cases such as detection and localization, I have tried using MaskRCNN, which gives really good results but poor inference speed, means it is not production-ready.</p>
  
  <p>The worrying factor in both cases is how slow detection and inference is, compared to traditional vision algorithms. A solution would be to buy Machine Vision software specifically from companies such as Cognex, HALCON, etc, who sell deep learning bundles. They are quite expensive and are to be used out- of- box with minimal modifications, which does not suit me currently.</p>
  
  <p>Point 2, is highly necessary in production lines, where each iteration/image may take less than 500ms for execution.</p>
  
  <p>Deep Learning gives a lot of opportunities in getting state of the art results with very less data in most of the situations, but in general without inference optimization in using apps such as TensorRT, the "time" metric does not give good results.</p>
  
  <p>Is there an approach in using open source that can solve both point 1 and point 2? Creating a CNN from scratch is out of the question.</p>
  
  <p>This post is to discuss ideas if possible, I know a concrete solution is not really possible in the scope of this question. I am the only person working on this problem at my company, thus any discussion ideas would be highly appreciated!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T23:11:28.173Z
Comments.Text: What do you mean by "erroneous data" exactly? Anyway, have you tried to augment your dataset? That has proven to be beneficial in some cases (e.g. see the u-net paper).
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-16T06:46:19.653Z
Comments.Text: Hi, erroneous data - dataset of errors.  Yes data augmentation is an option, but when the error dataset has like 10 images , its very hard to increase the dataset. In general practice, this causes severe overfitting. Have also tried going the anomaly detection route.
Comments.UserDisplayName: DragonsCanDance
Tags: <machine-learning><deep-learning><convolutional-neural-networks><computer-vision>
Title: Overcome caveats on using Deep Learning for faster inference on limited performance availability
UserDisplayName: DragonsCanDance
ThreadText: # Overcome caveats on using Deep Learning for faster inference on limited performance availability
  
  (Asked by: username_0 on 2020-06-15)
  
  I am working in the field of Machine Vision, where accuracy and performance both play a major factor in deciding the approach towards a problem. Traditional rule based approaches work quite well in such cases.
  
  I am gradually migrating towards deep learning, due to its umpteen advantages, where the results seem promising albeit with two huge caveats:
  
  1. Lack of Training data in this field. To be precise, the lack of erroneous data.
  2. Performance issues on inference. Accuracy and speed are required in equal proportion, and cannot be compromised.
  
  In industrial settings, Point 1 plays a strong factor. I have been dabbling with Transfer learning techniques and using pre-trained models to overcome this situation. For simpler applications such as classification, this suits and gives good results. In other cases such as detection and localization, I have tried using MaskRCNN, which gives really good results but poor inference speed, means it is not production-ready.
  
  The worrying factor in both cases is how slow detection and inference is, compared to traditional vision algorithms. A solution would be to buy Machine Vision software specifically from companies such as Cognex, HALCON, etc, who sell deep learning bundles. They are quite expensive and are to be used out- of- box with minimal modifications, which does not suit me currently.
  
  Point 2, is highly necessary in production lines, where each iteration/image may take less than 500ms for execution.
  
  Deep Learning gives a lot of opportunities in getting state of the art results with very less data in most of the situations, but in general without inference optimization in using apps such as TensorRT, the "time" metric does not give good results.
  
  Is there an approach in using open source that can solve both point 1 and point 2? Creating a CNN from scratch is out of the question.
  
  This post is to discuss ideas if possible, I know a concrete solution is not really possible in the scope of this question. I am the only person working on this problem at my company, thus any discussion ideas would be highly appreciated!
  
  **Tags:** machine-learning, deep-learning, convolutional-neural-networks, computer-vision
  > **Comments:**
  > **username_1**: What do you mean by "erroneous data" exactly? Anyway, have you tried to augment your dataset? That has proven to be beneficial in some cases (e.g. see the u-net paper).  
  > **username_0**: Hi, erroneous data - dataset of errors.  Yes data augmentation is an option, but when the error dataset has like 10 images , its very hard to increase the dataset. In general practice, this causes severe overfitting. Have also tried going the anomaly detection route.  
  
  ---
  
  ## 0 answers
  
  