Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounding boxes not showing when using tensorflow-gpu #155

Open
yassine-rd opened this issue Nov 27, 2022 · 10 comments
Open

Bounding boxes not showing when using tensorflow-gpu #155

yassine-rd opened this issue Nov 27, 2022 · 10 comments

Comments

@yassine-rd
Copy link

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?

@Ishihara-Masabumi
Copy link

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.

@MaximilianoAdaro
Copy link

MaximilianoAdaro commented Dec 1, 2022

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

@yassine-rd
Copy link
Author

yassine-rd commented Dec 1, 2022

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 yassine-rd changed the title Bounding boxes not showing when using tensorflow-gpu Bounding boxes not showing when using tensorflow-gpu on macOS Dec 1, 2022
@yassine-rd yassine-rd changed the title Bounding boxes not showing when using tensorflow-gpu on macOS Bounding boxes not showing when using tensorflow-gpu Dec 1, 2022
@Ishihara-Masabumi
Copy link

Thanks!
I did well.

@GeorgeLiou96
Copy link

Thanks! I did well.

Hi, how did you end up resolving this?

@Ishihara-Masabumi
Copy link

No problem.

@huyvt811
Copy link

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

@Ishihara-Masabumi
Copy link

OK, thanks.

@Mohamed-Ahmed-Abdullah
Copy link

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?

@huyvt811
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants