Using a RTSP-Stream or a M3U8 Stream with Object-Detection

The great scientists of the Honkong Multimedia-Laboratory have this great Project for Image-Recognition in place:

You don’t need much to test it on your own device; Install it like it is described in their fine documentation.

But there is one thing you can change – 
under /mmdetection/demo change the following lines in the file:

parser.add_argument('--camera-id', type=int, default=0, help='camera device id')


parser.add_argument('--camera-id' help='camera device id')

When youre done – you need to download one of the „Models“ ( – this are precalculated Nets and „ready-to-use“; For this example i did choose a retinanet-50 Model. Put the 140MB File somewhere readable and then you can for exampel use your Netatmo-Cam to observe live recognition of the objects:This works because the used OpenCV Framework supports not only direct attached hardware devices rather than also RTSP (didn’t test it so) and M3U8 Streams (tested). (Look-up documentation on camera = cv2.VideoCapture(args.camera_id))

python3 --camera-id http://Camera-IP/*secret*/live/index.m3u8 ../configs/ retinanet_r50_fpn_2x_20190616-75574209.pth

So check – if you want to use other Models – that config-Model and PTH-File-Model match.

Using a RTSP-Stream or a M3U8 Stream with Object-Detection