theAIGuysCode / yolov4-custom-functions

A Wide Range of Custom Functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny Implemented in TensorFlow, TFLite, and TensorRT.
MIT License
601 stars 372 forks source link

Bounding boxes not showing when using `tensorflow-gpu` #102

Open yassine-rd opened 1 year ago

yassine-rd commented 1 year ago

Hi,

So I've trained a YOLOv4 custom object detector on Colab and then downloaded the yolov4-custom.weights file.

When I run python save_model.py --weights ./data/yolov4-custom.weights --output ./checkpoints/yolov4-custom --model yolov4 using a tensorflow-gpu env, the ./checkpoints/yolov4-custom/ has the .pb files.

But when I run python detect_video.py --weights ./checkpoints/yolov4-custom --video ./data/video/test.mp4 --output ./outputs/result.avi --model yolov4, I don't see any bounding boxes on the video.

However, when I run the same command using a tensorflow-cpu env, the bounding boxes are drawn and everything works perfectly.

I'm actually using a macOS M1 machine.

Am I missing something?