hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.23k stars 1.24k forks source link

Slow Detection #414

Open ogzhn1k opened 2 years ago

ogzhn1k commented 2 years ago

W tensorflow/core/common_runtime/bfc_allocator.cc:311] Garbage collection: deallocate free memory regions (i.e., allocations) so that we can re-allocate a larger region to avoid OOM due to memory fragmentation. If you see this message frequently, you are running near the threshold of the available device memory and re-allocation may incur great performance overhead. You may try smaller batch sizes to observe the performance impact. Set TF_ENABLE_GPU_GARBAGE_COLLECTION=false if you'd like to disable this feature. Traceback (most recent call last): File "detect.py", line 107, in app.run(main) File "C:\Users*\anaconda3\envs\yolov4-gpu\lib\site-packages\absl\app.py", line 312, in run _run_main(main, args) File "C:\Users*\anaconda3\envs\yolov4-gpu\lib\site-packages\absl\app.py", line 258, in _run_main sys.exit(main(argv)) File "detect.py", line 97, in main image = utils.draw_bbox(original_image, pred_bbox, allowed_classes = allowed_classes) File "C:\Repos\tensorflow-yolov4-tflite\core\utils.py", line 159, in draw_bbox cv2.rectangle(image, c1, c2, bbox_color, bbox_thick) cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'rectangle'

Overload resolution failed:

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

(yolov4-gpu)

learninguser commented 2 years ago

Hi, Were you able to resolve this issue?