Yolact: YOLACT crashes with Intel RealSense camera

Created on 13 Jan 2020  路  2Comments  路  Source: dbolya/yolact

Hello, I'm running into problems with yolact taking video input from Realsense camera: https://github.com/IntelRealSense/librealsense

Setup:

  • [x] I have YOLACT installed and correctly running (detects objects in images, video files)
  • [x] I have librealsense2 installed and running (I can run the SDK and realsense-viewer, capture from camera etc)

When pointing the yolact eval.py script to use the HW camera, it crashes with

$ python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=0
Config not specified. Parsed yolact_base_config from the file name.

Loading model... Done.
VIDEOIO ERROR: V4L2: property frame_count is not supported
Initializing model... Done.
Traceback (most recent call last):
File "eval.py", line 1104, in <module>
evaluate(net, dataset)
File "eval.py", line 891, in evaluate
evalvideo(net, args.video)
File "eval.py", line 801, in evalvideo
active_frames = [{'value': extract_frame(first_batch, i), 'idx': 0} for i in range(len(first_batch[0]))]
File "eval.py", line 801, in <listcomp>
active_frames = [{'value': extract_frame(first_batch, i), 'idx': 0} for i in range(len(first_batch[0]))]
File "eval.py", line 790, in <lambda>
extract_frame = lambda x, i: (x[0][i] if x[1][i] is None else x[0][i].to(x[1][i]['detection']['box'].device), [x[1][i]])
TypeError: 'NoneType' object is not subscriptable

It seems the

VIDEOIO ERROR: V4L2: property frame_count is not supported

is the pointer to the trouble. Any help or advice is appreciated! Thanks in advance

Most helpful comment

The frame_count error seems to just be a warning, but I can fix it so it doesn't display that warning.

The real issue is actually #266. It was an oversight when I was integrating YOLACT++ into this code base, but that should be fixed in the latest version. The error was just when there was no detection on screen, it would crash :/

But anyway, that's fixed now so I'll close the issue with a hushing of that warning.

All 2 comments

The frame_count error seems to just be a warning, but I can fix it so it doesn't display that warning.

The real issue is actually #266. It was an oversight when I was integrating YOLACT++ into this code base, but that should be fixed in the latest version. The error was just when there was no detection on screen, it would crash :/

But anyway, that's fixed now so I'll close the issue with a hushing of that warning.

The real issue [with RealSense] is actually #266. [...] that should be fixed in the latest version. The error was just when there was no detection on screen, it would crash :/

that's superb news! Thanks a lot for your active support on the issues here :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevedipaola picture stevedipaola  路  8Comments

abhigoku10 picture abhigoku10  路  6Comments

onoderay picture onoderay  路  6Comments

serhatiscan picture serhatiscan  路  5Comments

mrtechnoo picture mrtechnoo  路  4Comments