madhawav / YOLO3-4-Py

A Python wrapper on Darknet. Compatible with YOLO V3.
Apache License 2.0
515 stars 164 forks source link

batch inference #123

Closed anhminh3105 closed 3 years ago

anhminh3105 commented 4 years ago

Hi.

I'm currently trying to do inferencing on a batch of images but it seems to be not supported. Could you help me clarify this? I assumed so from receiving this error.

(3, 720, 1280, 3) E1102 22:12:26.996962 139961929172736 detector.py:308] Error: AssertionError occured with message: ASSERT::3channel RGB only!! in module: DarknetAPI E1102 22:12:27.019028 139961929172736 camera.py:59] Error: AssertionError occured with message: ASSERT::3channel RGB only!! in module: Camera E1102 22:12:27.050637 139961929172736 camera.py:59] Error: AssertionError occured with message: ASSERT::3channel RGB only!! in module: Camera E1102 22:12:27.059478 139961929172736 camera.py:59] Error: AssertionError occured with message: ASSERT::3channel RGB only!! in module: Camera Exception in thread Thread-1: Traceback (most recent call last): File "/home/am/.conda/envs/pm-oulu/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/am/.conda/envs/pm-oulu/lib/python3.6/threading.py", line 864, in run self._target(*self._args, *self._kwargs) File "/media/am/DATA/Projects/ouluni-parking-monitoring/src/run.py", line 336, in loop self.detect() File "/media/am/DATA/Projects/ouluni-parking-monitoring/src/run.py", line 268, in detect detections = self.detector(inputs) File "/home/am/.conda/envs/pm-oulu/lib/python3.6/site-packages/drlib/cv/detector/detector.py", line 336, in call results = self.detect(args, **kwargs) File "/home/am/.conda/envs/pm-oulu/lib/python3.6/site-packages/drlib/cv/detector/darknetapi.py", line 113, in detect X = dnet.Image(X) File "pydarknet.pyx", line 30, in pydarknet.Image.cinit AssertionError: ASSERT::3channel RGB only!!

madhawav commented 3 years ago

Hi, I can confirm that batch inference is not supported.