Wei Quan
4c5d9bff80
Fix incorrect end epoch comment ( #3612 )
3 years ago
Glenn Jocher
4984cf54be
train.py GPU memory fix ( #3590 )
* train.py GPU memory fix
* ema
* cuda
* cuda
* zeros input
* to device
* batch index 0
3 years ago
Glenn Jocher
4695ca8314
Refactoring cleanup ( #3565 )
* Refactoring cleanup
* Update test.py
3 years ago
Glenn Jocher
5948f20a3d
Update test.py profiling ( #3555 )
* Update test.py profiling
* half_precision to half
* inplace
3 years ago
Glenn Jocher
63157d214d
Remove `is_coco` argument from `test()` ( #3553 )
3 years ago
Glenn Jocher
958ab92dc1
Remove `opt` from `create_dataloader()`` ( #3552 )
3 years ago
Glenn Jocher
ef0b5c9d29
On-demand `pycocotools` pip install ( #3547 )
3 years ago
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>
3 years ago
Glenn Jocher
4aa2959101
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
3 years ago
Glenn Jocher
4b52e19a61
COCO evolution fix ( #3388 )
* COCO evolution fix
* cleanup
* update print
* print fix
3 years ago
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
3 years ago
Glenn Jocher
aad99b63d6
TensorBoard DP/DDP graph fix ( #3325 )
3 years ago
Charles Frye
19100ba007
Improves docs and handling of entities and resuming by WandbLogger ( #3264 )
* adds latest tag to match wandb defaults
* adds entity handling, 'last' tag
* fixes bug causing finished runs to resume
* removes redundant "last" tag for wandb artifact
3 years ago
Glenn Jocher
dd7f0b7e05
Fix TypeError: 'PosixPath' object is not iterable ( #3285 )
3 years ago
Glenn Jocher
10d56d784e
Assert `--image-weights` not combined with DDP ( #3275 )
3 years ago
Glenn Jocher
b7cd1f540d
TensorBoard add_graph() fix ( #3236 )
3 years ago
Glenn Jocher
60fe54449d
Update train.py ( #3099 )
3 years ago
Glenn Jocher
a833ee2a46
Update check_requirements() exclude list ( #2974 )
3 years ago
Glenn Jocher
f7bc685c2c
Implement yaml.safe_load() ( #2876 )
* Implement yaml.safe_load()
* yaml.safe_dump()
3 years ago
Burhan
c949fc86d1
Detection cropping+saving feature addition for detect.py and PyTorch Hub ( #2827 )
* Update detect.py
* Update detect.py
* Update greetings.yml
* Update cropping
* cleanup
* Update increment_path()
* Update common.py
* Update detect.py
* Update detect.py
* Update detect.py
* Update common.py
* cleanup
* Update detect.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
6dd1083bbb
Tensorboard model visualization bug fix ( #2758 )
This fix should allow for visualizing YOLOv5 model graphs correctly in Tensorboard by uncommenting line 335 in train.py:
```python
if tb_writer:
tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), []) # add model graph
```
The problem was that the detect() layer checks the input size to adapt the grid if required, and tracing does not seem to like this shape check (even if the shape is fine and no grid recomputation is required). The following will warn:
0cae7576a9/train.py (L335)
Solution is below. This is a YOLOv5s model displayed in TensorBoard. You can see the Detect() layer merging the 3 layers into a single output for example, and everything appears to work and visualize correctly.
```python
tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), [])
```
<img width="893" alt="Screenshot 2021-04-11 at 01 10 09" src="https://user-images.githubusercontent.com/26833433/114286928-349bd600-9a63-11eb-941f-7139ee6cd602.png ">
3 years ago
Ding Yiwei
1148e2ea63
Add TransformerLayer, TransformerBlock, C3TR modules ( #2333 )
* yolotr
* transformer block
* Remove bias in Transformer
* Remove C3T
* Remove a deprecated class
* put the 2nd LayerNorm into the 2nd residual block
* move example model to models/hub, rename to -transformer
* Add module comments and TODOs
* Remove LN in Transformer
* Add comments for Transformer
* Solve the problem of MA with DDP
* cleanup
* cleanup find_unused_parameters
* PEP8 reformat
Co-authored-by: DingYiwei <846414640@qq.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Phat Tran
9c803f2f7e
Add --label-smoothing eps argument to train.py (default 0.0) ( #2344 )
* Add label smoothing option
* Correct data type
* add_log
* Remove log
* Add log
* Update loss.py
remove comment (too versbose)
Co-authored-by: phattran <phat.tranhoang@cyberlogitec.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Ayush Chaurasia
518c09578e
W&B resume ddp from run link fix ( #2579 )
* W&B resume ddp from run link fix
* Native DDP W&B support for training, resuming
3 years ago
Ayush Chaurasia
dc51e80b00
Fix: evolve with wandb ( #2634 )
3 years ago
Glenn Jocher
9f98201dd9
W&B DDP fix 2 ( #2587 )
Revert unintentional change to test batch sizes caused by PR https://github.com/ultralytics/yolov5/pull/2125
3 years ago
Glenn Jocher
e5b0200cd2
Update tensorboard>=2.4.1 ( #2576 )
* Update tensorboard>=2.4.1
Update tensorboard version to attempt to address https://github.com/ultralytics/yolov5/issues/2573 (tensorboard logging fail in Docker image).
* cleanup
3 years ago
Ayush Chaurasia
1bf9365280
W&B DDP fix ( #2574 )
3 years ago
Ayush Chaurasia
e8fc97aa38
Improved W&B integration ( #2125 )
* Init Commit
* new wandb integration
* Update
* Use data_dict in test
* Updates
* Update: scope of log_img
* Update: scope of log_img
* Update
* Update: Fix logging conditions
* Add tqdm bar, support for .txt dataset format
* Improve Result table Logger
* Init Commit
* new wandb integration
* Update
* Use data_dict in test
* Updates
* Update: scope of log_img
* Update: scope of log_img
* Update
* Update: Fix logging conditions
* Add tqdm bar, support for .txt dataset format
* Improve Result table Logger
* Add dataset creation in training script
* Change scope: self.wandb_run
* Add wandb-artifact:// natively
you can now use --resume with wandb run links
* Add suuport for logging dataset while training
* Cleanup
* Fix: Merge conflict
* Fix: CI tests
* Automatically use wandb config
* Fix: Resume
* Fix: CI
* Enhance: Using val_table
* More resume enhancement
* FIX : CI
* Add alias
* Get useful opt config data
* train.py cleanup
* Cleanup train.py
* more cleanup
* Cleanup| CI fix
* Reformat using PEP8
* FIX:CI
* rebase
* remove uneccesary changes
* remove uneccesary changes
* remove uneccesary changes
* remove unecessary chage from test.py
* FIX: resume from local checkpoint
* FIX:resume
* FIX:resume
* Reformat
* Performance improvement
* Fix local resume
* Fix local resume
* FIX:CI
* Fix: CI
* Imporve image logging
* (:(:Redo CI tests:):)
* Remember epochs when resuming
* Remember epochs when resuming
* Update DDP location
Potential fix for #2405
* PEP8 reformat
* 0.25 confidence threshold
* reset train.py plots syntax to previous
* reset epochs completed syntax to previous
* reset space to previous
* remove brackets
* reset comment to previous
* Update: is_coco check, remove unused code
* Remove redundant print statement
* Remove wandb imports
* remove dsviz logger from test.py
* Remove redundant change from test.py
* remove redundant changes from train.py
* reformat and improvements
* Fix typo
* Add tqdm tqdm progress when scanning files, naming improvements
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
08d4918d7f
labels.jpg class names ( #2454 )
* labels.png class names
* fontsize=10
3 years ago
Glenn Jocher
f01f3223d5
Integer printout ( #2450 )
* Integer printout
* test.py 'Labels'
* Update train.py
3 years ago
Glenn Jocher
886f1c03d8
DDP after autoanchor reorder ( #2421 )
3 years ago
Glenn Jocher
e931b9da33
Resume with custom anchors fix ( #2361 )
* Resume with custom anchors fix
* Update train.py
3 years ago
Glenn Jocher
a3ecf0fd64
Anchor override ( #2350 )
3 years ago
Glenn Jocher
fab5085674
EMA bug fix 2 ( #2330 )
* EMA bug fix 2
* update
3 years ago
Glenn Jocher
dfeec198cb
final_epoch EMA bug fix ( #2317 )
3 years ago
Jan Hajek
efa4946d15
W&B entity support ( #2298 )
* W&B entity support
* shorten wandb_entity to entity
Co-authored-by: Jan Hajek <jan.hajek@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
3 years ago
Glenn Jocher
71dd2768f2
Improved model+EMA checkpointing 2 ( #2295 )
3 years ago
Glenn Jocher
ec1d8496ba
Improved model+EMA checkpointing ( #2292 )
* Enhanced model+EMA checkpointing
* update
* bug fix
* bug fix 2
* always save optimizer
* ema half
* remove model.float()
* model half
* carry ema/model in fp32
* rm model.float()
* both to float always
* cleanup
* cleanup
3 years ago
Glenn Jocher
ca5b10b759
Update train.py ( #2290 )
* Update train.py
* Update train.py
* Update train.py
* Update train.py
* Create train.py
3 years ago
Glenn Jocher
e27ca0d845
Update minimum stride to 32 ( #2266 )
3 years ago
Glenn Jocher
6b634c6b87
Linear LR scheduler option ( #2150 )
* Linear LR scheduler option
* Update train.py
3 years ago
Glenn Jocher
ad839eda38
Update train.py ( #2149 )
3 years ago
Glenn Jocher
86897e3663
Update train.py test batch_size ( #2148 )
* Update train.py
* Update loss.py
3 years ago
Glenn Jocher
2acbe9699a
W&B epoch logging update ( #2073 )
3 years ago
Glenn Jocher
f639e14e4d
Metric-Confidence plots feature addition ( #2057 )
* Metric-Confidence plots feature addition
* cleanup
* Metric-Confidence plots feature addition
* cleanup
* Update run-once lines
* cleanup
* save all 4 curves to wandb
3 years ago
Glenn Jocher
59c21c7bcb
W&B log epoch ( #1946 )
* W&B log epoch
* capitalize
* W&B log epoch
* capitalize
* Update train.py
New try using https://docs.wandb.ai/library/log#incremental-logging
* Update train.py
* Update test.py
* Update train.py
* Update plots.py
* Update train.py
* Update train.py
* label plot step -1
* update
* update
* update
* update
* update
* update
* Update train.py
* Update train.py
3 years ago
Glenn Jocher
046c37e465
verbose on final_epoch ( #1997 )
3 years ago
Abhiram V
e9941d50fa
Update train.py with yaml.SafeLoader ( #1972 )
3 years ago
huntr.dev | the place to protect open source
b5d851d653
Security Fix for Arbitrary Code Execution - huntr.dev ( #1962 )
Co-authored-by: Anon-Artist <61599526+Anon-Artist@users.noreply.github.com>
Co-authored-by: Jamie Slome <jamie@418sec.com>
3 years ago