forked from ultralytics/yolov5
-
Notifications
You must be signed in to change notification settings - Fork 0
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
update detect.py
for torchscript support
#1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple update for torchscript support. Assumes the torchscript file has been generated with `export.py`
* Requirements updated 1. Requests added to requirements.txt. That might not be included in all docker base images, adding it to the requirements is safer. 2. Added a minimum version to Pandas. It's a good practice to have versions for all dependencies. * Sort alphabetically * Update requirements.txt Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: qiningonline <qiningonline@gmail.com>
…ics#5110) * fix different devices bug * extend _apply() instead of to() for a general fix * Only apply if Detect() is last layer Co-authored-by: Jebastin Nadar <njebastin10@gmail.com> * Indent fix * Add comment to yolo.py * Add comment to common.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update val.py `pad = 0.0 if task == speed else 0.5` * Cleanup
* use os.path.relpath instead of relative_to * use os.path.relpath instead of relative_to * Remove os.path from val.py * Remove os.path from train.py * Update detect.py import to os * Update export.py import to os Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
…ralytics#4833) * refactor anchors and anchor_grid in Detect Layer * fix CI failures by adding compatibility * fix tf failure * fix different devices errors * Cleanup * fix anchors overwriting issue * better refactoring * Remove self.anchor_grid shape check (redundant with self.grid check) Also PEP8 / 120 line width * Convert _make_grid() from static to dynamic method * Remove anchor_grid.to(device) clone() should already clone to same device as self.anchors * fix different devices error Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Add OpenCV DNN option for ONNX inference Usage: ```bash python detect.py --weights yolov5s.onnx # ONNX Runtime inference python detect.py --weights yolov5s.onnx -dnn # OpenCV DNN inference ``` * DNN prediction to tensor * Update detect.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simple update for torchscript support. Assumes the torchscript file has been generated with
export.py