theAIGuysCode/yolov4-deepsort

Bounding boxes not showing when using `tensorflow-gpu`

yassine-rd opened this issue · 10 comments

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 object_tracker.py --video ./data/video/test.mp4 --output ./outputs/result.avi --weights ./checkpoints/yolov4-custom --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.

Am I missing something?

Me too,

On the Linux machine of ubuntu 20.04 and Python 3.8.10 with GPU, I didn't see any bounding boxes and ids from the output of object_tracker.py.
However, when I run the same command using only cpu, the bounding boxes and ids from the output of object_tracker.py are shown.

Please fix it or let me know how to get the bounding boxes and ids.

I'm using Google Collab with GPU and this requirements-gpu.txt file changes, and it's working.
Still trying to fix to run it with my PC macOS M1 Pro with CPU.

tensorflow-gpu==2.3.0
opencv-python==4.1.2.30
lxml
tqdm
absl-py
matplotlib
easydict
pillow
numpy==1.18.5
scipy==1.4.1

I'm using Google Collab with GPU and this requirements-gpu.txt file changes, and it's working. Still trying to fix to run it with my PC macOS M1 Pro with CPU.

tensorflow-gpu==2.3.0
opencv-python==4.1.2.30
lxml
tqdm
absl-py
matplotlib
easydict
pillow
numpy==1.18.5
scipy==1.4.1

Are you able to run your object_detector.py directly on your machine using a GPU env and have bounding boxes shown @MaximilianoAdaro?
PS : I'm using a macOS M1 too

Thanks!
I did well.

Thanks! I did well.

Hi, how did you end up resolving this?

No problem.

Me too,

On the Linux machine of ubuntu 20.04 and Python 3.8.10 with GPU, I didn't see any bounding boxes and ids from the output of object_tracker.py. However, when I run the same command using only cpu, the bounding boxes and ids from the output of object_tracker.py are shown.

Please fix it or let me know how to get the bounding boxes and ids.

too

How did you end up resolving this problem @Ishihara-Masabumi ?
Let me know how to get the bounding boxes and ids. I has same issue now

OK, thanks.

I'm having the same issue, any suggestions for solution?
I tried to run Yolo4 separately on darknet and it's working fine but when I use the same .weight file with deepsort it doesn't work, any suggestions?

I fixed it by using commit it pull request! PLEASE CHECK IT AND INFORM IF IT STILL HAS ISSUES.