Search code examples
videoartificial-intelligencevideo-processingyolo

Detect missing objects in a video


I was wondering how can a missing object be detected using something similar to YOLO? Let's say I have the first video capturing a smartphone, keys and a passport. Then I have another video capturing the smartphone and keys only, is it possible to put up a warning stating that there is an object missing?


Solution

  • Yes. If you are using the python version of AlexeyAB darknet, you can see all the detections in this line:

    https://github.com/AlexeyAB/darknet/blob/master/darknet_video.py#L81

    Then search for the labels in the array and if a label is not in that array, you return a warning or do whatever you need.

    if b'smartphone' not in detections[0]
         print('Warning')