Commit Graph

52 Commits (1a3ecb8b386115fd22129eaf0760157b161efac7)

Author SHA1 Message Date
Glenn Jocher 95c7bc25d3
OpenVINO Export (#6057)
* OpenVINO export

* Remove timeout

* Add 3 files

* str

* Constrain opset to 12

* Default ONNX opset to 12

* Make dir

* Make dir

* Cleanup

* Cleanup

* check_requirements(('openvino-dev',))
2021-12-22 20:29:48 +01:00
hamid mohammadi 97b6b14abe
Add `requests` to requirements.txt (#5112)
* 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>
2021-10-09 15:51:01 -07:00
Glenn Jocher 2993c3fa7a
Add `roboflow` (#4956) 2021-09-27 19:00:05 -07:00
Glenn Jocher 3a822a22ce
`PIL.ImageDraw.text(anchor=...)` removal, reduce to `>=7.1.2` (#4842)
* Unpin Pillow

* Update requirements.txt

* Update plots.py
2021-09-17 13:02:37 +02:00
Glenn Jocher c3a93d783d
Add TensorFlow formats to `export.py` (#4479)
* Initial commit

* Remove unused export_torchscript return

* ROOT variable

* Add prefix to fcn arg

* fix ROOT

* check_yaml into run()

* interim fixes

* imgsz=(320, 320)

* Hardcode tf_raw_resize False

* Finish opt elimination

* Update representative_dataset_gen()

* Update export.py with TF methods

* SiLU and GraphDef fixes

* file_size() directory handling feature

* export fixes

* add lambda: to representative_dataset

* Detect training False default

* Fuse false for TF models

* Embed agnostic NMS arguments

* Remove lambda

* TensorFlow.js export success

* Add pb to Usage

* Add *_tfjs_model/ to ignore files

* prepend YOLOv5 to function headers

* Remove end --- comments

* parameterize tfjs export pb file

* update run() data default /ROOT

* update --include help

* update imports

* return ct_model

* Consolidate TFLite export

* pb prerequisite to tfjs

* TF modules CamelCase

* Remove exports from tf.py and cleanup

* pass agnostic NMS arguments

* CI

* CI

* ignore *_web_model/

* Add tensorflow to CI dependencies

* CI tensorflow-cpu

* Update requirements.txt

* Remove tensorflow check_requirement

* CI coreml tfjs

* export only onnx torchscript

* reorder exports torchscript first
2021-09-12 15:52:24 +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
Jiacong Fang 808bcad3bb
Add TensorFlow and TFLite export (#1127)
* Add models/tf.py for TensorFlow and TFLite export

* Set auto=False for int8 calibration

* Update requirements.txt for TensorFlow and TFLite export

* Read anchors directly from PyTorch weights

* Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export

* Remove check_anchor_order, check_file, set_logging from import

* Reformat code and optimize imports

* Autodownload model and check cfg

* update --source path, img-size to 320, single output

* Adjust representative_dataset

* Put representative dataset in tfl_int8 block

* detect.py TF inference

* weights to string

* weights to string

* cleanup tf.py

* Add --dynamic-batch-size

* Add xywh normalization to reduce calibration error

* Update requirements.txt

TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error

* Fix imports

Move C3 from models.experimental to models.common

* Add models/tf.py for TensorFlow and TFLite export

* Set auto=False for int8 calibration

* Update requirements.txt for TensorFlow and TFLite export

* Read anchors directly from PyTorch weights

* Add --tf-nms to append NMS in TensorFlow SavedModel and GraphDef export

* Remove check_anchor_order, check_file, set_logging from import

* Reformat code and optimize imports

* Autodownload model and check cfg

* update --source path, img-size to 320, single output

* Adjust representative_dataset

* detect.py TF inference

* Put representative dataset in tfl_int8 block

* weights to string

* weights to string

* cleanup tf.py

* Add --dynamic-batch-size

* Add xywh normalization to reduce calibration error

* Update requirements.txt

TensorFlow 2.3.1 -> 2.4.0 to avoid int8 quantization error

* Fix imports

Move C3 from models.experimental to models.common

* implement C3() and SiLU()

* Fix reshape dim to support dynamic batching

* Add epsilon argument in tf_BN, which is different between TF and PT

* Set stride to None if not using PyTorch, and do not warmup without PyTorch

* Add list support in check_img_size()

* Add list input support in detect.py

* sys.path.append('./') to run from yolov5/

* Add int8 quantization support for TensorFlow 2.5

* Add get_coco128.sh

* Remove --no-tfl-detect in models/tf.py (Use tf-android-tfl-detect branch for EdgeTPU)

* Update requirements.txt

* Replace torch.load() with attempt_load()

* Update requirements.txt

* Add --tf-raw-resize to set half_pixel_centers=False

* Add --agnostic-nms for TF class-agnostic NMS

* Cleanup after merge

* Cleanup2 after merge

* Cleanup3 after merge

* Add tf.py docstring with credit and usage

* pb saved_model and tflite use only one model in detect.py

* Add use cases in docstring of tf.py

* Remove redundant `stride` definition

* Remove keras direct import

* Fix `check_requirements(('tensorflow>=2.4.1',))`

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-17 13:18:16 +02:00
Glenn Jocher 7fdcc77bf4
Albumentations >= 1.0.3 (#4068) 2021-07-19 13:23:19 +02:00
Glenn Jocher a544d59f52
Update requirements.txt `albumentations>=1.0.2` (#3972) 2021-07-11 19:07:42 +02:00
Glenn Jocher 33202b7f0b
YOLOv5 + Albumentations integration (#3882)
* Albumentations integration

* ToGray p=0.01

* print confirmation

* create instance in dataloader init method

* improved version handling

* transform not defined fix

* assert string update

* create check_version()

* add spaces

* update class comment
2021-07-05 18:01:54 +02:00
Glenn Jocher ef0b5c9d29
On-demand `pycocotools` pip install (#3547) 2021-06-09 11:22:21 +02:00
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>
2021-06-08 10:22:10 +02:00
Glenn Jocher ee24ae11ea
Comment Cython (#3297)
Ultralytics REST API fix.
2021-05-23 17:53:54 +02:00
Glenn Jocher 7b863a34dc
Add Cython (#3217)
Cython required by pycocotools in certain cases, i.e. https://github.com/cocodataset/cocoapi/issues/172
2021-05-19 19:58:53 +02:00
Glenn Jocher b098600763
Update requirements.txt `onnx>=1.9.0` (#3143) 2021-05-12 19:56:12 +02:00
Glenn Jocher fca16dc4b3
Remove Cython from requirements.txt (#2604)
Cython should be a dependency of the remaining packages in requirements.txt, so should be installed anyway even if not a direct requirement.
2021-03-25 21:48:25 +01:00
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
2021-03-24 01:29:00 +01:00
Glenn Jocher ace3e02e40
Update requirements.txt (#2173) 2021-02-09 22:03:29 -08:00
Glenn Jocher 3551b072b3
Docker pyYAML>=5.3.1 fix (#2031) 2021-01-24 11:54:15 -08:00
Glenn Jocher c76c607265
PyYAML==5.4.1 (#2030) 2021-01-24 10:05:40 -08:00
Glenn Jocher 9a3da79b4a
Update requirements.txt (#2021)
* Update requirements.txt

* Update ci-testing.yml

* Update hubconf.py
2021-01-23 12:51:04 -08:00
Durgesh ab0db8d104
Fix: Seaborn error due to histplot (#1740) 2020-12-19 09:30:43 -08:00
Glenn Jocher fa8f1fb0e9
Simplify autoshape() post-process (#1653)
* Simplify autoshape() post-process

* cleanup

* cleanup
2020-12-09 07:44:06 -08:00
Glenn Jocher 0a3ff71ae0
Confusion matrix (#1474)
* initial commit

* add plotting

* matrix to cpu

* bug fix

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* seaborn pandas to requirements.txt

* seaborn pandas to requirements.txt

* update wandb plotting

* remove pandas

* if plots

* if plots

* if plots

* if plots

* if plots

* initial commit

* add plotting

* matrix to cpu

* bug fix

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* update plot

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* seaborn pandas to requirements.txt

* seaborn pandas to requirements.txt

* update wandb plotting

* remove pandas

* if plots

* if plots

* if plots

* if plots

* if plots

* Cat apriori to autolabels

* cleanup
2020-11-23 15:27:14 +01:00
Glenn Jocher 93fc607f07 PyTorch Hub and autoShape update (#1415) 2020-11-16 23:14:07 +01:00
Glenn Jocher 177f39e98e
onnx>=1.8.0 2020-11-08 19:41:54 +01:00
Glenn Jocher 194f16844e Multi-threaded image caching 2020-11-07 02:18:18 +01:00
Ayush Chaurasia ca290dca24
Weights & Biases (W&B) Feature Addition (#1235)
* Add wandb metric logging and bounding box debugging

* Improve formatting, readability

* Remove mutliple path for init, improve formatting

* Add wandb params

* Remove typecasting in bbox coordinates and reformat

* Cleanup

* add wandb to requirements.txt

* minor updates to test.py

* general reorg

* reduce --log-imgs to 10

* clean wandb import

* reverse wandb import assert

* add except AssertionError to try import

* move wandb init to all global ranks

* replace print() with logger.info()

* replace print() with logger.info()

* move wandb.init() bug fix

* project PosixPath to basename bug fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2020-10-31 20:16:35 +01:00
Glenn Jocher d87cf7ecb9
Update requirements.txt coremltools==4.0 2020-10-11 16:21:39 +02:00
Glenn Jocher 35fe98543c
Update requirements.txt coremltools==4.0b4 2020-10-05 01:47:04 +02:00
Glenn Jocher 987c226849 seaborn plotting correlogram addition 2020-08-29 15:13:58 -07:00
Glenn Jocher 5f07782f56 Update requirements.txt for coremltools kmeans quantization 2020-08-22 20:50:53 -07:00
Glenn Jocher fb05681a04 Update requirements.txt to coremltools==4.0b3 2020-08-22 14:22:15 -07:00
Glenn Jocher 7b2b52193d update requirements.txt 2020-08-14 10:14:48 -07:00
Glenn Jocher e742dcf417 update requirements.txt 2020-08-08 12:57:05 -07:00
Glenn Jocher 61b5733c36 update requirements.txt 2020-08-01 14:00:38 -07:00
Glenn Jocher 3e5e44499d update requirements.txt 2020-08-01 14:00:14 -07:00
Glenn Jocher 60d5dc0294
PyTorch 1.6.0 update with native AMP (#573) 2020-07-31 10:54:08 -07:00
Glenn Jocher 07a82f4d44
Update ci-testing.yml (#445)
* Update ci-testing.yml

* Update ci-testing.yml

* Update requirements.txt

* Update requirements.txt

* Update google_utils.py

* Update test.py

* Update ci-testing.yml
2020-07-19 15:44:11 -07:00
Glenn Jocher b6fe2e4595
Update requirements.txt 2020-07-19 10:20:15 -07:00
Glenn Jocher 3e8c89d5ab update requirements.txt 2020-07-16 13:37:58 -07:00
Doug 7d19f98273
Update requirements.txt
numpy 1.17.3 is required for python3.8
2020-07-14 16:34:54 -06:00
Glenn Jocher 1b9e28e72e
Update requirements.txt 2020-07-08 10:21:30 -07:00
Glenn Jocher 24dd150fbd update torch>=1.4 2020-06-20 11:55:39 -07:00
Lornatang 899f1d4bde Fix DDP bug in single process multiple device use cases 2020-06-20 13:00:03 +08:00
Prashant Rai 0071b69994
onnx should be 1.6.0
for smoothly export model to onnx, onnx should be 1.6.0
2020-06-17 14:15:27 +05:30
Glenn Jocher 260b1729f0 FP16 inference update 2020-06-14 18:32:29 -07:00
Glenn Jocher 629d3701fc pyyaml >= 5.3 2020-06-14 12:42:51 -07:00
Glenn Jocher 4dd75b3635 pycocotools git install fix 2020-06-14 10:54:00 -07:00
Glenn Jocher 1374581929
Update requirements.txt 2020-06-14 10:23:33 -07:00