-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix the consistency of pre-processing with yolov5 #293
Merged
Merged
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
45dc664
Modify copyrights
zhiqwang bf1dd4e
Fix docstring
zhiqwang fe76c96
add letterbox function
ed406a7
Apply pre-commit format
339f07e
Fix importing torch.nn.functional
zhiqwang 92ab438
Add unittest for letterbox
zhiqwang 1c58ac7
Move letterbox into yolort.models.transform
zhiqwang 8595755
Cleanup letterbox
zhiqwang 3e2a0d8
Move 255 into the letterbox method
zhiqwang 8e7b4a4
Add more test for letterbox
zhiqwang 25aae82
Add fill_color to be filled in NestedTensor
zhiqwang 69e2e49
Use numpy testing in test_letterbox
zhiqwang 3a1f4cd
Add attributes size_divisible and fill_color in YOLOTransform
zhiqwang 0926c15
Fixing docstrings
zhiqwang c83e23f
Adopt torchvison's structure
zhiqwang 855c61d
Fix testing for batch_images
zhiqwang a58e187
Fixing docstrings
zhiqwang ee947ec
Remove fixed_size from YOLOTransform
zhiqwang 170f108
Fixing parameters and docstrings in YOLOv5
zhiqwang 028073a
Updating with torchvision
zhiqwang 6503980
Padding into 2 sides in YOLOTransform
zhiqwang 21f3fe6
Fixing type annotation
zhiqwang 62e50b1
Move up parameter num_classes
zhiqwang 3496b7b
Fix fill_color scale in YOLOTransform
zhiqwang 210ac5c
Rename resize_boxes to scale_coords
zhiqwang 1a1a4c6
Fix classmethod load_from_yolov5 in YOLOv5
zhiqwang 98778aa
Fix the image_sizes in NestedTensor
zhiqwang ce6a951
Fixing docstrings
zhiqwang 791fc7a
Fix size_divisible in test_load_from_yolov5
zhiqwang 9652ae8
Minor fixes for type annotation
zhiqwang cfb250e
Fixing exporting ONNX
zhiqwang e0a770a
Fixing TestONNXExporter
zhiqwang 4a09f34
Cleanup padding rule when batching
zhiqwang ecc96a5
Minor fixes
zhiqwang 9af5443
Set fail-fast to false in GH Actions
zhiqwang 1b7383e
Minor fixes
zhiqwang 36ba3aa
Fixing type casting and annotations
zhiqwang 0338fb8
Using consistent torch.int32 when casting in YOLOTransform
zhiqwang f285ac4
Fixing batching inference
zhiqwang a39710c
Cleanup ONNX Tester
zhiqwang 11fbab3
Fixing casting Tensor.item() when exporting ONNX
zhiqwang f51fd33
Just test ONNX export without postprocess
zhiqwang 2be9407
Apply pre-commit
zhiqwang 614a40f
Fixing shape inference when tracing
zhiqwang 15c60ed
Add types to letterbox
zhiqwang af38239
Cleanup YOLOTransform
zhiqwang b95e357
Fixing YOLOTransform letterbox batching
zhiqwang 8bc3e78
Updating Intuition for yolort Notebook
zhiqwang 3394321
Minor fixes
zhiqwang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyTorch's interpolate operator now only aligns with OpenCV for the float type, and the
letterbox
implemented by yolov5 operates onuint8
, so the precision we set here is relatively low.Check pytorch/pytorch#5580 (comment) for more details.