RcINS
d115bbf509
Fix `cv2.imwrite` on non-ASCII paths ( #7139 )
* Fix imwrite on non-ASCII paths
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update general.py
* Update __init__.py
* Update __init__.py
* Update datasets.py
* Update hubconf.py
* Update detect.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update general.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 2 roky
Glenn Jocher
d5966c93f1
Namespace `VERBOSE` env variable to `YOLOv5_VERBOSE` ( #6428 )
* Verbose updates
* Verbose updates
před 2 roky
Glenn Jocher
e7bf38277f
Fix `device` count check ( #6290 )
* Fix device count check()
* Update torch_utils.py
* Update torch_utils.py
* Update hubconf.py
před 2 roky
Glenn Jocher
e8ef8fb1ca
`pretrained=False` fix ( #5966 )
* `pretriained=False` fix
Fix for https://github.com/ultralytics/yolov5/issues/5964
* CI speed improvement
před 2 roky
Glenn Jocher
7bf04d9bbf
`AutoShape()` models as `DetectMultiBackend()` instances ( #5845 )
* Update AutoShape()
* autodownload ONNX
* Cleanup
* Finish updates
* Add Usage
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* fix device
* Update hubconf.py
* Update common.py
* smart param selection
* autodownload all formats
* autopad only pytorch models
* new_shape edits
* stride tensor fix
* Cleanup
před 2 roky
Glenn Jocher
46daa7b78d
Remove `.autoshape()` method ( #5694 )
před 3 roky
Glenn Jocher
e189fa15ea
`intersect_dicts()` in hubconf.py fix ( #5542 )
před 3 roky
Jirka Borovec
0155548384
precommit: isort ( #5493 )
* precommit: isort
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update isort config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update name
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 3 roky
Glenn Jocher
956be8e642
YOLOv5 release v6.0 ( #5141 )
* Update P5 models
* Update P6 models
* Update with GFLOPs and Params
* Update with GFLOPs and Params
* Update README
* Update
* Update README
* Update
* Update
* Add times
* Update README
* Update results
* Update results
* Update results
* Update hyps
* Update plots
* Update plots
* Update README.md
* Add nano models to hubconf.py
před 3 roky
Glenn Jocher
4c839eeb10
Simplify `check_requirements()` usage ( #4855 )
* Simplify `check_requirements()` usage
* remove assert, print()
před 3 roky
Glenn Jocher
c47be26f34
Replace `path.absolute()` with `path.resolve()` ( #4763 )
před 3 roky
Omid Sadeghnezhad
dbc06ce292
Update hubconf.py attempt_load import ( #4428 )
před 3 roky
Glenn Jocher
24bea5e4b7
Standardize headers and docstrings ( #4417 )
* Implement new headers
* Reformat 1
* Reformat 2
* Reformat 3 - math
* Reformat 4 - yaml
před 3 roky
Glenn Jocher
2683b18079
Update Hub Path inputs ( #4200 )
před 3 roky
Glenn Jocher
5d66e48723
Train from `--data path/to/dataset.zip` feature ( #4185 )
* Train from `--data path/to/dataset.zip` feature
* Update dataset_stats()
* cleanup
* cleanup2
před 3 roky
Glenn Jocher
411842e058
Fix `torch.hub.list('ultralytics/yolov5')` pathlib bug ( #3921 )
před 3 roky
johnohagan
61047a2b4f
Save PyTorch Hub models to `/root/hub/cache/dir` ( #3904 )
* Create hubconf.py
* Add save_dir variable
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 3 roky
Glenn Jocher
6a3ee7cf03
Hub models `map_location=device` ( #3894 )
* Hub models `map_location=device`
* cleanup
před 3 roky
Glenn Jocher
ef0b5c9d29
On-demand `pycocotools` pip install ( #3547 )
před 3 roky
Glenn Jocher
f3c3d2ce5d
Merge `develop` branch into `master` ( #3518 )
* update ci-testing.yml (#3322 )
* update ci-testing.yml
* update greetings.yml
* bring back os matrix
* update ci-testing.yml (#3322 )
* update ci-testing.yml
* update greetings.yml
* bring back os matrix
* Enable direct `--weights URL` definition (#3373 )
* Enable direct `--weights URL` definition
@KalenMike this PR will enable direct --weights URL definition. Example use case:
```
python train.py --weights https://storage.googleapis.com/bucket/dir/model.pt
```
* cleanup
* bug fixes
* weights = attempt_download(weights)
* Update experimental.py
* Update hubconf.py
* return bug fix
* comment mirror
* min_bytes
* Update tutorial.ipynb (#3368 )
add Open in Kaggle badge
* `cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379 )
* Update datasets.py
* comment
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* COCO evolution fix (#3388 )
* COCO evolution fix
* cleanup
* update print
* print fix
* Create `is_pip()` function (#3391 )
Returns `True` if file is part of pip package. Useful for contextual behavior modification.
```python
def is_pip():
# Is file in a pip package?
return 'site-packages' in Path(__file__).absolute().parts
```
* Revert "`cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379 )" (#3395 )
This reverts commit 21a9607e00
.
* Update FLOPs description (#3422 )
* Update README.md
* Changing FLOPS to FLOPs.
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
* Parse URL authentication (#3424 )
* Parse URL authentication
* urllib.parse.unquote()
* improved error handling
* improved error handling
* remove %3F
* update check_file()
* Add FLOPs title to table (#3453 )
* Suppress jit trace warning + graph once (#3454 )
* Suppress jit trace warning + graph once
Suppress harmless jit trace warning on TensorBoard add_graph call. Also fix multiple add_graph() calls bug, now only on batch 0.
* Update train.py
* Update MixUp augmentation `alpha=beta=32.0` (#3455 )
Per VOC empirical results https://github.com/ultralytics/yolov5/issues/3380#issuecomment-853001307 by @developer0hye
* Add `timeout()` class (#3460 )
* Add `timeout()` class
* rearrange order
* Faster HSV augmentation (#3462 )
remove datatype conversion process that can be skipped
* Add `check_git_status()` 5 second timeout (#3464 )
* Add check_git_status() 5 second timeout
This should prevent the SSH Git bug that we were discussing @KalenMike
* cleanup
* replace timeout with check_output built-in timeout
* Improved `check_requirements()` offline-handling (#3466 )
Improve robustness of `check_requirements()` function to offline environments (do not attempt pip installs when offline).
* Add `output_names` argument for ONNX export with dynamic axes (#3456 )
* Add output names & dynamic axes for onnx export
Add output_names and dynamic_axes names for all outputs in torch.onnx.export. The first four outputs of the model will have names output0, output1, output2, output3
* use first output only + cleanup
Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Revert FP16 `test.py` and `detect.py` inference to FP32 default (#3423 )
* fixed inference bug ,while use half precision
* replace --use-half with --half
* replace space and PEP8 in detect.py
* PEP8 detect.py
* update --half help comment
* Update test.py
* revert space
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Add additional links/resources to stale.yml message (#3467 )
* Update stale.yml
* cleanup
* Update stale.yml
* reformat
* Update stale.yml HUB URL (#3468 )
* Stale `github.actor` bug fix (#3483 )
* Explicit `model.eval()` call `if opt.train=False` (#3475 )
* call model.eval() when opt.train is False
call model.eval() when opt.train is False
* single-line if statement
* cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* check_requirements() exclude `opencv-python` (#3495 )
Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494 .
* Earlier `assert` for cpu and half option (#3508 )
* early assert for cpu and half option
early assert for cpu and half option
* Modified comment
Modified comment
* Update tutorial.ipynb (#3510 )
* Reduce test.py results spacing (#3511 )
* Update README.md (#3512 )
* Update README.md
Minor modifications
* 850 width
* Update greetings.yml
revert greeting change as PRs will now merge to master.
Co-authored-by: Piotr Skalski <SkalskiP@users.noreply.github.com>
Co-authored-by: SkalskiP <piotr.skalski92@gmail.com>
Co-authored-by: Peretz Cohen <pizzaz93@users.noreply.github.com>
Co-authored-by: tudoulei <34886368+tudoulei@users.noreply.github.com>
Co-authored-by: chocosaj <chocosaj@users.noreply.github.com>
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Sam_S <SamSamhuns@users.noreply.github.com>
Co-authored-by: Samridha Shrestha <samridha.shrestha@g42.ai>
Co-authored-by: edificewang <609552430@qq.com>
před 3 roky
Glenn Jocher
3f03acb3db
check_requirements() exclude `opencv-python` ( #3507 )
Duplicate of #3495 merged to `develop`. This PR will be merged to `master`.
Fixes https://github.com/ultralytics/yolov5/issues/3494 .
před 3 roky
Glenn Jocher
90b7895d65
check_requirements() exclude `opencv-python` ( #3495 )
Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494 .
před 3 roky
Glenn Jocher
ba6f3f974b
Enable direct `--weights URL` definition ( #3373 )
* Enable direct `--weights URL` definition
@KalenMike this PR will enable direct --weights URL definition. Example use case:
```
python train.py --weights https://storage.googleapis.com/bucket/dir/model.pt
```
* cleanup
* bug fixes
* weights = attempt_download(weights)
* Update experimental.py
* Update hubconf.py
* return bug fix
* comment mirror
* min_bytes
před 3 roky
Christoph Gerum
b133baa336
Add `device` argument to PyTorch Hub models ( #3104 )
* Allow to manual selection of device for torchhub models
* single line device
nested torch.device(torch.device(device)) ok
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 3 roky
Glenn Jocher
06372b1465
Scope all hubconf.py imports for torch.hub.list() ( #3145 )
* Scope all hubconf.py imports for torch.hub.list()
* Update hubconf.py
před 3 roky
Glenn Jocher
1935266951
Scope imports for torch.hub.list() improvement ( #3144 )
před 3 roky
Glenn Jocher
31ee54c28c
Hubconf.py bug fix ( #3007 )
před 3 roky
Glenn Jocher
7c89c829e3
cleanup
před 3 roky
Glenn Jocher
c1a44ed9c5
Update hubconf.py for unified loading ( #3005 )
před 3 roky
Glenn Jocher
d08575ee5e
PyTorch Hub load directly when possible ( #2986 )
před 3 roky
Glenn Jocher
a833ee2a46
Update check_requirements() exclude list ( #2974 )
před 3 roky
NanoCode012
c0d3f80544
Add verbose option to pytorch hub models ( #2926 )
* Add verbose and update print to logging
* Fix positonal param
* Revert auto formatting changes
* Update hubconf.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 3 roky
Glenn Jocher
c15e25c40f
PyTorch Hub cv2 .save() .show() bug fix ( #2831 )
* PyTorch Hub cv2 .save() .show() bug fix
cv2.rectangle() was failing on non-contiguous np array inputs. This checks for contiguous arrays and applies is necessary:
```python
imgs[i] = im if im.data.contiguous else np.ascontiguousarray(im) # update
```
* Update plots.py
```python
assert im.data.contiguous, 'Image not contiguous. Apply np.ascontiguousarray(im) to plot_on_box() input image.'
```
* Update hubconf.py
Expand CI tests to OpenCV image.
před 3 roky
Glenn Jocher
0f395b3e3b
YOLOv5 v5.0 Release patch 1 ( #2764 )
* torch.jit.trace(model, img, strict=False)
* Update check_file()
* Update hubconf.py
* Update README.md
před 3 roky
Glenn Jocher
f5b8f7d54c
YOLOv5 v5.0 Release ( #2762 )
před 3 roky
Glenn Jocher
c03d590320
Add Hub results.pandas() method ( #2725 )
* Add Hub results.pandas() method
New method converts results from torch tensors to pandas DataFrames with column names.
This PR may partially resolve issue https://github.com/ultralytics/yolov5/issues/2703
```python
results = model(imgs)
print(results.pandas().xyxy[0])
xmin ymin xmax ymax confidence class name
0 57.068970 391.770599 241.383545 905.797852 0.868964 0 person
1 667.661255 399.303589 810.000000 881.396667 0.851888 0 person
2 222.878387 414.774231 343.804474 857.825073 0.838376 0 person
3 4.205386 234.447678 803.739136 750.023376 0.658006 5 bus
4 0.000000 550.596008 76.681190 878.669922 0.450596 0 person
```
* Update comments
torch example input now shown resized to size=640 and also now a multiple of P6 stride 64 (see https://github.com/ultralytics/yolov5/issues/2722#issuecomment-814785930 )
* apply decorators
* PEP8
* Update common.py
* pd.options.display.max_columns = 10
* Update common.py
před 3 roky
Glenn Jocher
866bc7d640
Speed profiling improvements ( #2648 )
* Speed profiling improvements
* Update torch_utils.py
deepcopy() required to avoid adding elements to model.
* Update torch_utils.py
před 3 roky
Glenn Jocher
ee169834bd
PyTorch Hub custom model to CUDA device fix ( #2636 )
Fix for #2630 raised by @Pro100rus32
před 3 roky
Glenn Jocher
8ace1b1b99
YOLOv5 PyTorch Hub models >> check_requirements() ( #2588 )
* YOLOv5 PyTorch Hub models >> check_requirements()
Update YOLOv5 PyTorch Hub requirements.txt path to cache path.
* Update hubconf.py
před 3 roky
Glenn Jocher
2bcc89d762
YOLOv5 PyTorch Hub models >> check_requirements() ( #2577 )
* Update hubconf.py with check_requirements()
Dependency checks have been missing from YOLOv5 PyTorch Hub model loading, causing errors in some cases when users are attempting to import hub models in unsupported environments. This should examine the YOLOv5 requirements.txt file and pip install any missing or version-conflict packages encountered.
This is highly experimental (!), please let us know if this creates problems in your custom workflows.
* Update hubconf.py
před 3 roky
Glenn Jocher
9b11f0c58b
PyTorch Hub models default to CUDA:0 if available ( #2472 )
* PyTorch Hub models default to CUDA:0 if available
* device as string bug fix
před 3 roky
Glenn Jocher
569757ecc0
Add autoShape() speed profiling ( #2459 )
* Add autoShape() speed profiling
* Update common.py
* Create README.md
* Update hubconf.py
* cleanuip
před 3 roky
Glenn Jocher
fab5085674
EMA bug fix 2 ( #2330 )
* EMA bug fix 2
* update
před 3 roky
Glenn Jocher
db28ce61ac
Improved hubconf.py CI tests ( #2251 )
před 3 roky
Glenn Jocher
9a3da79b4a
Update requirements.txt ( #2021 )
* Update requirements.txt
* Update ci-testing.yml
* Update hubconf.py
před 3 roky
NanoCode012
14b0abe2d0
autoShape() default for PyTorch Hub models ( #1692 )
* Add autoshape parameter
* Remove autoshape call in ReadMe
* Update hubconf.py
* file/URI inputs and autoshape check passthrough
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
před 3 roky
Glenn Jocher
e92245a38c
Simplified PyTorch hub for custom models ( #1677 )
před 3 roky
Glenn Jocher
f7a923b446
Simplified PyTorch hub for custom models ( #1677 )
před 3 roky
Glenn Jocher
87ca35b922
Simplified PyTorch hub for custom models ( #1677 )
před 3 roky
Glenn Jocher
fa8f1fb0e9
Simplify autoshape() post-process ( #1653 )
* Simplify autoshape() post-process
* cleanup
* cleanup
před 3 roky