yolov4-deepsort icon indicating copy to clipboard operation
yolov4-deepsort copied to clipboard

Bounding boxes not showing when using `tensorflow-gpu`

Open yassine-rd opened this issue 1 year ago • 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?

yassine-rd avatar Nov 27 '22 15:11 yassine-rd

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.

Ishihara-Masabumi avatar Dec 01 '22 00:12 Ishihara-Masabumi

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

MaximilianoAdaro avatar Dec 01 '22 04:12 MaximilianoAdaro

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

yassine-rd avatar Dec 01 '22 07:12 yassine-rd

Thanks! I did well.

Ishihara-Masabumi avatar Dec 01 '22 21:12 Ishihara-Masabumi

Thanks! I did well.

Hi, how did you end up resolving this?

GeorgeLiou96 avatar Feb 01 '23 21:02 GeorgeLiou96

No problem.

Ishihara-Masabumi avatar Feb 02 '23 02:02 Ishihara-Masabumi

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

huyvt811 avatar Mar 13 '23 07:03 huyvt811

OK, thanks.

Ishihara-Masabumi avatar Mar 13 '23 08:03 Ishihara-Masabumi

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?

Mohamed-Ahmed-Abdullah avatar Apr 17 '23 07:04 Mohamed-Ahmed-Abdullah

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

huyvt811 avatar Apr 20 '23 12:04 huyvt811