Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Jocher e7d1842a98 Auto-download Arial.ttf on init (#4606)
* Auto-download Arial.ttf on init

* Fix ROOT
2021-08-30 14:58:22 +02:00
Glenn Jocher bb4da083d1 Created using Colaboratory 2021-08-30 14:33:53 +02:00
Glenn Jocher dc13820c9d TensorBoard on_train_end() speed improvements (#4605) 2021-08-30 13:01:41 +02:00
Glenn Jocher b894e69dfc Update mosaic plots font size (#4596) 2021-08-29 18:05:49 +02:00
Glenn Jocher bfad364455 Created using Colaboratory 2021-08-29 17:56:35 +02:00
Glenn Jocher dbbc6b5c48 Re-order plots.py to class-first (#4595) 2021-08-29 17:44:51 +02:00
Glenn Jocher e5e5ebc799 Auto-UTF handling (#4594) 2021-08-29 17:15:18 +02:00
Glenn Jocher de44376d1b Create Annotator() class (#4591)
* Add Annotator() class

* Download Arial

* 2x for loop

* Cleanup

* tuple 2 list

* max_size=1920

* bold logging results to

* tolist()

* im = annotator.im

* PIL save in detect.py

* Smart asarray in detect.py

* revert to cv2.imwrite

* Cleanup

* Return result asarray

* Add `Profile()` profiler

* CamelCase Timeout

* Resize after mosaic

* pillow>=8.0.0

* daemon imwrite

* Add cv2 support

* Remove plot_wh_methods and plot_one_box

* pil=False for hubconf.py annotations

* im.shape bug fix

* colorstr common.py

* join daemons

* Update t.daemon

* Removed daemon saving
2021-08-29 16:46:13 +02:00
Glenn Jocher bbfafeabdb Add Profile() profiler (#4587)
* Add `Profile()` profiler

* CamelCase Timeout
2021-08-29 13:49:04 +02:00
Glenn Jocher d7aa3f153d Remove image_weights DDP code (#4579)
* Initial commit

* Update
2021-08-28 19:17:21 +02:00
Glenn Jocher 93cc015748 Add EarlyStopping feature (#4576)
* Add EarlyStopping feature

* Add comment

* Cleanup

* Cleanup2

* debug

* debug2

* debug3

* debug3

* debug4

* debug5

* debug6

* debug7

* debug8

* debug9

* debug10

* debug11

* debug12

* Cleanup

* Add TODO for known DDP issue
2021-08-28 19:03:52 +02:00
Glenn Jocher 8b18b66304 ONNX opset 13 (#4566) 2021-08-27 16:00:39 +02:00
Glenn Jocher 8ac96b7975 Fix for AP calculation limits 0.0 - 1.0 (#4563)
This PR brings alignment in AP computation practices with Detectron2 and MMDetection. 

Problem first noted by @yusiyoh in https://github.com/ultralytics/yolov5/issues/4546
2021-08-27 13:23:29 +02:00
Glenn Jocher e899d6e8fb Fix for corrupt JPEGs auto-fix PR (#4560)
Auto-fix corrupt JPEGs PR introduced a bug whereby the f.seek() operation read all of the bytes in the image, resulting in the PIL image having nothing to read upon the .save() operation. 

Fix was to re-open the image using PIL before saving.
2021-08-27 13:01:21 +02:00
Glenn Jocher 11f85e7e71 Auto-fix corrupt JPEGs (#4548)
* Autofix corrupt JPEGs

This PR automatically re-saves corrupt JPEGs and trains with the resaved images. WARNING: this will overwrite the existing corrupt JPEGs in a dataset and replace them with correct JPEGs, though the filesize may increase and the image contents may not be exactly the same due to lossy JPEG compression schemes. Results may vary by JPEG decoder and hardware.

Current behavior is to exclude corrupt JPEGs from training with a warning to the user, but many users have been complaining about large parts of their dataset being excluded from training.

* Clarify re-save reason
2021-08-26 15:51:04 +02:00
Glenn Jocher 2da6444c92 Fix for python models/yolo.py --profile (#4541)
Profiling fix copies input to Detect layer to circumvent inplace changes to the feature maps.
2021-08-25 21:23:28 +02:00
Glenn Jocher 79af1144c2 Automatic TFLite uint8 determination (#4515)
* Auto TFLite uint8 detection

This PR automatically determines if TFLite models are uint8 quantized rather than accepting a manual argument.

The quantization determination is based on @zldrobit comment https://github.com/ultralytics/yolov5/pull/1127#issuecomment-901713847

* Cleanup
2021-08-23 17:05:53 +02:00
Glenn Jocher 7b1643b5b5 Add install=True argument to check_requirements (#4512)
* Add `install=True` argument to `check_requirements`

* Update general.py
2021-08-23 14:38:30 +02:00
Glenn Jocher d1182c4f29 check_requirements(('coremltools',)) (#4478)
* `check_requirements(('coremltools',))`

* Update ci-testing.yml

* Update ci-testing.yml
2021-08-18 21:16:57 +02:00
Glenn Jocher 6dd7dd8dd3 Fix default --weights yolov5s.pt (#4458) 2021-08-17 23:29:07 +02:00
Glenn Jocher f3e3f7603f TFLite prep (#4436) 2021-08-16 17:25:06 +02:00
Glenn Jocher 19d03a955c Remove DDP process group timeout (#4422) 2021-08-15 18:32:41 +02:00
Glenn Jocher 4e65052f28 Created using Colaboratory 2021-08-15 16:41:57 +02:00
Glenn Jocher 01cdb7671b Add SPPF() layer (#4420)
* Add `SPPF()` layer

* Cleanup

* Add credit
2021-08-15 14:28:35 +02:00
Glenn Jocher 24bea5e4b7 Standardize headers and docstrings (#4417)
* Implement new headers

* Reformat 1

* Reformat 2

* Reformat 3 - math

* Reformat 4 - yaml
2021-08-14 21:17:51 +02:00
Glenn Jocher bb0aed1ba6 Created using Colaboratory 2021-08-14 21:12:05 +02:00
Glenn Jocher 2da4e7acf7 Merge PIL and OpenCV in plot_one_box(use_pil=False) (#4416)
* Merge PIL and OpenCV box plotting functions

* Add ASCII check to plot_one_box

* Cleanup

* Cleanup2
2021-08-14 17:44:15 +02:00
Glenn Jocher 63e09fdc48 Remove encoding='ascii' (#4413)
* Remove `encoding='ascii'`

* Reinstate `encoding='ascii'` in emojis()
2021-08-14 13:47:20 +02:00
Glenn Jocher 4e8c81a368 Add yolov5s-ghost.yaml (#4412)
* Add yolov5s-ghost.yaml

* Finish C3Ghost

* Add C3Ghost to list

* Add C3Ghost to number of repeats if statement

* Fixes

* Cleanup
2021-08-14 12:55:22 +02:00
Glenn Jocher e086347377 Update plots.py (#4407) 2021-08-14 12:50:27 +02:00
Glenn Jocher 57c342a6a5 Simplify ONNX inference command (#4405) 2021-08-13 13:22:13 +02:00
Glenn Jocher 3e7c59ad3b Fix rename utils.google_utils to utils.downloads (#4393) 2021-08-11 23:40:47 +02:00
Glenn Jocher 11e4aebfef Update README.md (#4387) 2021-08-11 18:33:34 +02:00
Glenn Jocher b27f69f108 Created using Colaboratory 2021-08-11 18:32:06 +02:00
Glenn Jocher ce7deec440 int(mlc) (#4385) 2021-08-11 17:32:13 +02:00
Glenn Jocher 86c7150cfd Update newline (#4308) 2021-08-04 17:41:38 +02:00
Glenn Jocher e78aeac973 Evolve in CSV format (#4307)
* Update evolution to CSV format

* Update

* Update

* Update

* Update

* Update

* reset args

* reset args

* reset args

* plot_results() fix

* Cleanup

* Cleanup2
2021-08-04 17:13:38 +02:00
Glenn Jocher 4103ce9ad0 Simplify callbacks (#4289) 2021-08-04 13:17:35 +02:00
Glenn Jocher 388016e9e3 Update 'results saved to' string (#4275) 2021-08-02 15:48:53 +02:00
Glenn Jocher 587c4b4b81 Add DWConvClass() (#4274)
* Add `DWConvClass()`

* Cleanup

* Cleanup2
2021-08-02 15:36:30 +02:00
Glenn Jocher 9c6732f61c Update variables (#4273) 2021-08-02 15:13:55 +02:00
Glenn Jocher 306fc0119a Update Autoshape forward header (#4271) 2021-08-02 12:42:23 +02:00
Glenn Jocher 53bfcbe0ae Update AP calculation (#4260)
* Update AP calculation

* Cleanup

* Remove original
2021-08-01 20:36:00 +02:00
Glenn Jocher d8f18834a2 Update profile() for CUDA Memory allocation (#4239)
* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Cleanup
2021-07-30 18:17:19 +02:00
Glenn Jocher 9468657502 Update profiler (#4236) 2021-07-30 16:00:47 +02:00
Glenn Jocher 8d3c3ef45c Fix weight decay comment (#4228) 2021-07-30 01:35:39 +02:00
Glenn Jocher 1a10b0ecd2 Created using Colaboratory 2021-07-30 01:04:36 +02:00
Glenn Jocher 083c13da45 Created using Colaboratory 2021-07-30 00:58:14 +02:00
Glenn Jocher 18f6ba77cf Suppress torch 1.9.0 max_pool2d() warning (#4227) 2021-07-30 00:37:55 +02:00
Glenn Jocher c2c958c350 Explicit requirements.txt location (#4225) 2021-07-29 17:29:39 +02:00
Glenn Jocher 7820614c40 Add @try_except decorator (#4224) 2021-07-29 17:23:35 +02:00
Glenn Jocher b60b62e874 PyCharm reformat (#4209)
* PyCharm reformat

* YAML reformat

* Markdown reformat
2021-07-28 23:35:14 +02:00
Glenn Jocher e016b15555 Update yolov5-bifpn.yaml (#4208) 2021-07-28 21:25:20 +02:00
Glenn Jocher 2683b18079 Update Hub Path inputs (#4200) 2021-07-28 16:55:39 +02:00
Glenn Jocher 1f31b7c503 Create yolov5-bifpn.yaml (#4195) 2021-07-28 15:04:30 +02:00
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
2021-07-28 02:04:10 +02:00
Glenn Jocher 3fef11706c Update comments header (#4184) 2021-07-27 23:23:41 +02:00
Glenn Jocher 0ad6301c96 Update script headers (#4163)
* Update download script headers

* cleanup

* bug fix attempt

* bug fix attempt2

* bug fix attempt3

* cleanup
2021-07-26 15:23:33 +02:00
Glenn Jocher f8e11483df Update dataset headers (#4162) 2021-07-26 14:23:43 +02:00
Glenn Jocher 8acb5734c7 Created using Colaboratory 2021-07-26 00:57:09 +02:00
Glenn Jocher 96e36a7c91 New CSV Logger (#4148)
* New CSV Logger

* cleanup

* move batch plots into Logger

* rename comment

* Remove total loss from progress bar

* mloss :-1 bug fix

* Update plot_results()

* Update plot_results()

* plot_results bug fix
2021-07-25 19:06:37 +02:00
Glenn Jocher 3764277f95 Created using Colaboratory 2021-07-25 18:59:18 +02:00
Glenn Jocher 6e4358f3f3 Add export.py ONNX inference suggestion (#4146) 2021-07-25 13:46:16 +02:00
Glenn Jocher d17b45eaad Update README.md (#4143) 2021-07-25 01:22:00 +02:00
Glenn Jocher efe60b5681 Refactor train.py and val.py loggers (#4137)
* Update loggers

* Config

* Update val.py

* cleanup

* fix1

* fix2

* fix3 and reformat

* format sweep.py

* Logger() class

* cleanup

* cleanup2

* wandb package import fix

* wandb package import fix2

* txt fix

* fix4

* fix5

* fix6

* drop wandb into utils/loggers

* fix 7

* rename loggers/wandb_logging to loggers/wandb

* Update message

* Update message

* Update message

* cleanup

* Fix x axis bug

* fix rank 0 issue

* cleanup
2021-07-25 01:18:39 +02:00
Glenn Jocher 63dd65e7ed Update train.py (#4136)
* Refactor train.py

* Update imports

* Update imports

* Update optimizer

* cleanup
2021-07-24 16:11:39 +02:00
Glenn Jocher 264be1a616 Rename opset_version to opset (#4135) 2021-07-24 13:19:12 +02:00
Glenn Jocher 2e538443b7 ONNX inference update (#4073) 2021-07-24 13:08:51 +02:00
Glenn Jocher 39ef6c7a80 Update README.md (#4134) 2021-07-24 12:36:07 +02:00
Glenn Jocher 4bad914761 Update resume.py (#4115) 2021-07-22 17:22:11 +02:00
Glenn Jocher 2c073cd207 Add train.py `--img-size floor (#4099) 2021-07-21 16:50:47 +02:00
Glenn Jocher 3bef77f5cb Addition refactor export.py (#4089)
* Addition refactor `export.py`

* Update export.py
2021-07-20 18:42:27 +02:00
Glenn Jocher 442a7abdf2 Refactor export.py (#4080)
* Refactor `export.py`

* cleanup

* Update check_requirements()

* Update export.py
2021-07-20 13:21:52 +02:00
Glenn Jocher 7fdcc77bf4 Albumentations >= 1.0.3 (#4068) 2021-07-19 13:23:19 +02:00
Glenn Jocher ee76a68f1d Created using Colaboratory 2021-07-19 13:14:09 +02:00
Glenn Jocher c8a98cb7cb Missing nc and names handling in check_dataset() (#4066) 2021-07-19 13:10:21 +02:00
Glenn Jocher b1be685005 Module super().__init__() (#4065)
* Module `super().__init__()`

* remove NMS
2021-07-19 12:41:15 +02:00
Glenn JocherandAyush Chaurasia f7d8562060 val.py refactor (#4053)
* val.py refactor

* cleanup

* cleanup

* cleanup

* cleanup

* save after eval

* opt.imgsz bug fix

* wandb refactor

* dataloader to train_loader

* capitalize global variables

* runs/hub/exp to runs/detect/exp

* refactor wandb logging

* Refactor wandb operations (#4061)

Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
2021-07-19 10:43:01 +02:00
Glenn Jocher 9dd33fd20f AutoShape PosixPath support (#4047)
* AutoShape PosixPath support

Usage example:

````python
from pathlib import Path

model = ...
file = Path('data/images/zidane.jpg')

results = model(file)
```

* Update common.py
2021-07-18 15:25:37 +02:00
Glenn Jocher dd62e2d05c Update README.md (#4041)
* Update README.md

* Update README.md

* Update README.md
2021-07-17 23:12:27 +02:00
Glenn Jocher 0067d9578a Update greetings.yml (#4037) 2021-07-17 15:47:05 +02:00
Glenn Jocher 951922c735 Add --sync-bn known issue (#4032)
* Add `--sync-bn` known issue

* Update train.py
2021-07-17 13:07:19 +02:00
Glenn Jocher b7e985e397 Update greetings.yml (#4024)
* Update greetings.yml

* Update greetings.yml
2021-07-16 14:38:59 +02:00
Glenn Jocher 720aaa65c8 Rename test.py to val.py (#4000) 2021-07-14 15:43:54 +02:00
Glenn Jocher 8ee9fd1505 Update README.md (#3996) 2021-07-13 23:07:09 +02:00
Glenn Jocher d204a61834 Alert (no detections) (#3984)
* `Detections()` class `print()` overload

* Update common.py
2021-07-12 19:48:47 +02:00
Glenn Jocher b3dabdcc38 Update probability to p (#3980) 2021-07-12 15:54:43 +02:00
Glenn Jocher 41fdf9fa53 Created using Colaboratory 2021-07-12 12:43:26 +02:00
Glenn Jocher a544d59f52 Update requirements.txt albumentations>=1.0.2 (#3972) 2021-07-11 19:07:42 +02:00
Glenn Jocher 90e60b403d Update np.random.random() to random.random() (#3967) 2021-07-11 16:56:36 +02:00
Glenn Jocher 8298ce5e88 Update albumentations>=1.0.2 (#3966) 2021-07-11 15:49:30 +02:00
Glenn Jocher 80299a57e2 Numerical stability fix for Albumentations (#3958) 2021-07-10 19:50:53 +02:00
Glenn Jocher 443af8b25a Cache v0.4 update (#3954) 2021-07-10 14:18:46 +02:00
Glenn Jocher a26e7de2bf Update augmentations.py (#3948) 2021-07-09 16:45:04 +02:00
Glenn Jocher 248504cf13 Feature visualization improvements 32 (#3947) 2021-07-09 15:23:02 +02:00
Glenn Jocher dabad5793a Created using Colaboratory 2021-07-08 15:45:53 +02:00
Glenn Jocher 8c6f9e15bf Update dataset_stats() for zipped datasets (#3926)
* Update `dataset_stats()` for zipped datasets

@KalenMike

* cleanup
2021-07-08 11:42:30 +02:00
Glenn Jocher 850970e081 feature_visualization() CUDA fix (#3925) 2021-07-07 16:23:31 +02:00
Glenn Jocher 411842e058 Fix torch.hub.list('ultralytics/yolov5') pathlib bug (#3921) 2021-07-07 16:08:42 +02:00
Glenn Jocher 87b094bcbc Feature visualization update (#3920)
* Feature visualization update

* Save to jpg (faster)

* Save to png
2021-07-07 15:41:58 +02:00