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

yolov5版本 #1

Open
miaochenGuo opened this issue Jul 22, 2021 · 8 comments
Open

yolov5版本 #1

miaochenGuo opened this issue Jul 22, 2021 · 8 comments

Comments

@miaochenGuo
Copy link

请问这里使用的yolov5版本是多少呢?

@SamSamhuns
Copy link
Owner

The export is version agnostic working with any yolov5 version.
Although using anything larger than yolov5s, the FPS would be very low (< 5).

@tino926
Copy link

tino926 commented Aug 13, 2021

@SamSamhuns
In my testing, with both yolov5-4.0 and yolov5-5.0 release version, I got wrong results.
For example, with the .onnx model, I go such result:
image

With the openvino model, I got no bounding box on the result image, although some detected objects are shown in the terminal

bbox: [5. 0. 2. 0.] conf: 6.8569436 class: person   
bbox: [0. 0. 0. 0.] conf: 6.55484 class: person                                               
bbox: [3. 0. 4. 0.] conf: 6.3061295 class: person                                                                             
bbox: [0. 0. 0. 0.] conf: 5.994316 class: person                    
bbox: [1. 0. 6. 0.] conf: 5.759716 class: person     
bbox: [0. 0. 0. 0.] conf: 5.430946 class: person                                                                                 
bbox: [0. 0. 0. 0.] conf: 5.044397 class: sports ball             
bbox: [0. 0. 0. 0.] conf: 4.5600634 class: sports ball                                                                          
bbox: [0. 0. 0. 0.] conf: 4.388424 class: sports ball          
bbox: [ 5.  0. 10.  0.] conf: 3.1240857 class: sports ball           
bbox: [7. 0. 9. 0.] conf: 2.7049701 class: sports ball        
bbox: [9. 0. 7. 0.] conf: 2.6434095 class: sports ball    

Your method works perfect with the latest commit (https://github.com/ultralytics/yolov5/tree/3e7c59ad3bf5414d4b2a26e018f397e27a51c6f1)

Do you know what is the cause of the problem? Does the export.py from earlier versions have some bugs?

@SamSamhuns
Copy link
Owner

@tino926, hmm I think the issue is that there are many changes in the main yolov5 repo which might have unforeseen consequences for the exports and other format inference.

This repo was working with the commit you mentioned then some later changes are causing the issue. A possible cause might be this function def non_max_suppression(...) in utils/detector_utils.py. I think the function needs to be updated according to the latest commits in the yolov5 repo.

I will work on this when i have time and add a yolov5 release info so that people know which version it was tested for.

@SamSamhuns
Copy link
Owner

From the latest v5.0 release, results seem to be fine
frame_onnx_00001

@tino926
Copy link

tino926 commented Aug 17, 2021

@SamSamhuns,
It is different from my experiment. I want to check it again in case of any misunderstanding..,
when you say "latest v5.0 release", do you mean
this version: https://github.com/ultralytics/yolov5/releases/tag/v5.0
or the latest commit (git clone from https://github.com/ultralytics/yolov5.git)

@SamSamhuns
Copy link
Owner

It works with the latest commit on the GitHub repo as of August 16 and it works with the pt files exported with the "latest v5.0 release" (As the release does not include the export.py files)
You can also try the Google Colab https://colab.research.google.com/drive/1K8gnZEka47Gbcp1eJbBaSe3GxngJdvio?usp=sharing and run the section 1 and 3b to just test the onnx inference

@tino926
Copy link

tino926 commented Aug 17, 2021

@SamSamhuns,
Thanks for your work. This is my test, just for reference:

yolov5 5.0 release and 4.0 release both have export.py, they are located at "./models/export.py".

  1. model from 5.0 release, using 5.0 release's "./models/export.py", incorrect result
  2. model from 4.0 release, using 4.0 release's "./models/export.py", incorrect result.
  3. model from 5.0 release, using latest commit's "export.py", perfect result.
  4. model form 4.0 release, using latest commit's "export.py", perfect result.

@SamSamhuns
Copy link
Owner

Yeah, it seems there might have been some issues with the previous versions

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

3 participants