Answers.Body: <p>That is where object tracking comes in to solve those problems, an example would be the <a href="https://github.com/abewley/sort" rel="nofollow noreferrer">SORT</a> or <a href="https://github.com/nwojke/deep_sort" rel="nofollow noreferrer">Deep SORT</a> algorithms. They use IOU to match bounding boxes from one frame to the next and use Kalman filter to predict the next position in case the object was not detected in that frame, you can add a voting system to select the most voted object class (very useful for the OCR) to increase the model accuracy, that way you can get a .9999 accuracy even if your model by itself is not very accurate.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-21T13:48:35.857Z
Answers.LastActivityDate: 2023-02-23T14:00:16.660Z
Answers.LastEditDate: 2023-02-23T14:00:16.660Z
Answers.UserDisplayName: Abdelhadi Abdelhadi
Body: <p>I am aware that this question might be vague but I must try anyways.</p>
  <p>I am looking for a method or an algorithm or even just some keywords (to conduct further research) of how to deal with phenomenon of making sure that model logic will be correctly tracking changes in analysed camera feed based on CV models' results that are not always 100% correct and there might be some other minor disruptions to the image.</p>
  <p>It will be easiest to explain with the example: I have an app that will analyse camera feed of a parking situation in online mode to have the best possible view of the situation what cars are in and where, which of them left and when, which came in to what spot etc.
  I plan to use series of computer vision models such as object detection, CNN for detected objects classification, some OCR and so on. But the problem with this approach is that each model even if trained very well sooner or later will run into some problems like an object that was recognised one frame before is not recognised in current frame or OCR will confuse &quot;5&quot; and &quot;S&quot; and the resulting string will not be the same so the model can assume there is different car in the same place on one frame.
  Even though these errors will appear for example at 0.5% frames, this will still confuse the logic of the model a lot, if the logic will assume that the detection/classification results are always correct and disregard potential models' mistakes.</p>
  <p>Another example can be something that will cover part of the camera view for a quick moment and that will result in misdetection some of the objects on few more frames. So ideally the remedy to that problem should have some sort of memory and validation mechanism that will compare older and newer frames whether change in detected objects was legit or it came back to previous state after some short period of time.</p>
  <p>Is there any theory or methodology or just some good practices of dealing with such issues or it has to be analysed and mitigated on individual basis?</p>
  
Tags: <computer-vision><object-detection><logic>
Title: How to ensure continuity of AI model logic?
UserDisplayName: GKozinski
ThreadText: # How to ensure continuity of AI model logic?
  
  (Asked by: username_0 on 2023-02-20)
  
  I am aware that this question might be vague but I must try anyways.
  
  I am looking for a method or an algorithm or even just some keywords (to conduct further research) of how to deal with phenomenon of making sure that model logic will be correctly tracking changes in analysed camera feed based on CV models' results that are not always 100% correct and there might be some other minor disruptions to the image.
  
  It will be easiest to explain with the example: I have an app that will analyse camera feed of a parking situation in online mode to have the best possible view of the situation what cars are in and where, which of them left and when, which came in to what spot etc.
  I plan to use series of computer vision models such as object detection, CNN for detected objects classification, some OCR and so on. But the problem with this approach is that each model even if trained very well sooner or later will run into some problems like an object that was recognised one frame before is not recognised in current frame or OCR will confuse "5" and "S" and the resulting string will not be the same so the model can assume there is different car in the same place on one frame.
  Even though these errors will appear for example at 0.5% frames, this will still confuse the logic of the model a lot, if the logic will assume that the detection/classification results are always correct and disregard potential models' mistakes.
  
  Another example can be something that will cover part of the camera view for a quick moment and that will result in misdetection some of the objects on few more frames. So ideally the remedy to that problem should have some sort of memory and validation mechanism that will compare older and newer frames whether change in detected objects was legit or it came back to previous state after some short period of time.
  
  Is there any theory or methodology or just some good practices of dealing with such issues or it has to be analysed and mitigated on individual basis?
  
  **Tags:** computer-vision, object-detection, logic
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-02-21. Score: 1
  
  That is where object tracking comes in to solve those problems, an example would be the [SORT](https://github.com/abewley/sort) or [Deep SORT](https://github.com/nwojke/deep_sort) algorithms. They use IOU to match bounding boxes from one frame to the next and use Kalman filter to predict the next position in case the object was not detected in that frame, you can add a voting system to select the most voted object class (very useful for the OCR) to increase the model accuracy, that way you can get a .9999 accuracy even if your model by itself is not very accurate.
  
  
  ---
  
  