Mrinal Jain
7476012a4d
Update `check_git_status()` to run under `ROOT` working directory ( #5441 )
...
* Updating check_git_status() to switch to the repository root before performing git ops
* More pythonic
* Linting
* Remove redundant Path() call
* Generalizing the context manager
* Fixing error in context manager
* Cleanup
* Change to decorator
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-02 22:16:01 +01:00
Glenn Jocher
7b1f7aec46
Update `get_loggers()` ( #4854 )
...
* Update `set_logging()`
* Update export.py
* pre-commit fixes
* Update LoadImages
* Update LoadStreams
* Update print_args
* Single LOGGER definition
* yolo.py fix
Co-authored-by: pre-commit <pre-commit@example.com>
2021-11-01 18:22:13 +01:00
Glenn Jocher
8c326a1edf
Meshgrid `indexing='ij'` for PyTorch 1.10 ( #5309 )
...
* Meshgrid `indexing='ij'` for PyTorch 1.10
Will not merge currently as breaks backwards compatibility.
* Meshgrid `indexing='ij'` for PyTorch 1.10
Will not merge currently as breaks backwards compatibility.
* Add check_version hard argument
* Update comment
2021-11-01 14:33:08 +01:00
Glenn Jocher
5d4258fac5
Fix MixConv2d() remove shortcut + apply depthwise ( #5410 )
2021-10-30 13:38:51 +02:00
Ayush Chaurasia
620b535f85
Update sweep.py ( #5402 )
2021-10-29 19:21:59 +02:00
Jirka Borovec
ed887b5976
Add pre-commit CI actions ( #4982 )
...
* define pre-commit
* add CI code
* configure
* apply pre-commit
* fstring
* apply MD
* pre-commit
* Update torch_utils.py
* Update print strings
* notes
* Cleanup code-format.yml
* Update setup.cfg
* Update .pre-commit-config.yaml
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-28 18:35:01 +02:00
Glenn Jocher
ca19df5f7f
Add `autobatch` feature for best `batch-size` estimation ( #5092 )
...
* Autobatch
* fix mem
* fix mem2
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Update train.py
* print result
* Cleanup print result
* swap fix in call
* to 64
* use total
* fix
* fix
* fix
* fix
* fix
* Update
* Update
* Update
* Update
* Update
* Update
* Update
* Cleanup printing
* Update final printout
* Update autobatch.py
* Update autobatch.py
* Update autobatch.py
2021-10-25 13:56:13 +02:00
Ayush Chaurasia
692be757b6
W&B: Media panel fix ( #5317 )
2021-10-25 12:06:12 +02:00
Glenn Jocher
441b47c443
More informative `EarlyStopping()` message ( #5303 )
2021-10-22 20:02:19 +02:00
jdfr
15e8c4c15b
take EXIF orientation tags into account when fixing corrupt images ( #5270 )
...
* take EXIF orientation tags into account when fixing corrupt images
* fit 120 char
* sort imports
* Update local exif_transpose comment
We have a local inplace version that is faster than the official as the image is not copied. AutoShape() uses this for Hub models, but here it is not important as the datasets.py usage is infrequent (AutoShape() it is applied every image).
* Update datasets.py
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-20 21:35:47 +02:00
jdfr
db3bbdde0e
autosplit: take image files with uppercase extensions into account ( #5269 )
...
* take image files with uppercase extensions into account in autosplit
* case fix
* Refactor implementation
Removes additional variable (capital variable names are also only for global variables), and uses the same methodology as implemented earlier in datasets.py L409.
* Remove redundant rglob characters
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-20 19:25:33 +02:00
Glenn Jocher
752d97df2c
Add `on_fit_epoch_end` callback ( #5232 )
...
* Add `on_fit_epoch_end` callback
* Add results to train
* Update __init__.py
2021-10-18 14:28:22 +02:00
Glenn Jocher
13f7275555
Update/inplace ops ( #5233 )
...
* Clip Objects365 autodownload labels (#5214 )
Fixes out of bounds labels that seem to affect ~10% of images in dataset.
* Inplace ops
2021-10-18 14:24:48 +02:00
Glenn Jocher
991c654e81
Autofix duplicate label handling ( #5210 )
...
* Autofix duplicate labels
PR changes duplicate label handling from report error and ignore image-label pair to report warning and autofix image-label pair.
This should fix this common issue for users and allow everyone to get started and get a model trained faster and easier than before.
* sign fix
* Cleanup
* Increment cache version
* all to any fix
2021-10-15 12:32:08 -07:00
Glenn Jocher
7ee5aed0b3
Improved check_suffix() robustness to `''` and `""` ( #5192 )
...
* Improved check_suffix() robustness to `''` and `""`
* Cleanup
2021-10-14 12:00:39 -07:00
NauchtanRobotics
0be58f16f0
Adjust legend labels for classes without instances ( #5174 )
...
* legend-labels Adjust legend labels for classes without instances.
* #5158 Re-indexed series names: only classes containing data.
* #5158 Re-indexed series names: only classes containing data.
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-14 11:57:00 -07:00
Ayush Chaurasia
1172ac15fb
W&B: DDP fix ( #5176 )
...
* fix dpp with wandb disabled
* PyCharm reformat
* Fix
* fix
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-13 20:11:04 -07:00
Glenn Jocher
e520e820f1
Update autodownload fallbacks to v6.0 assets ( #5177 )
2021-10-13 19:58:38 -07:00
Ayush Chaurasia
d0bfeb3980
W&B: fix DDP with wandb disabled ( #5163 )
...
* fix dpp with wandb disabled
* PyCharm reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-13 16:17:15 -07:00
Glenn Jocher
a346926996
Add class filtering to `LoadImagesAndLabels()` dataloader ( #5172 )
...
* Add train class filter feature to datasets.py
Allows for training on a subset of total classes if `include_class` list is defined on datasets.py L448:
```python
include_class = [] # filter labels to include only these classes (optional)
```
* segments fix
2021-10-13 15:48:54 -07:00
Jebastin Nadar
9d75e42f98
Refactor `Detect()` anchors for ONNX <> OpenCV DNN compatibility ( #4833 )
...
* refactor anchors and anchor_grid in Detect Layer
* fix CI failures by adding compatibility
* fix tf failure
* fix different devices errors
* Cleanup
* fix anchors overwriting issue
* better refactoring
* Remove self.anchor_grid shape check (redundant with self.grid check)
Also PEP8 / 120 line width
* Convert _make_grid() from static to dynamic method
* Remove anchor_grid.to(device)
clone() should already clone to same device as self.anchors
* fix different devices error
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-11 09:58:42 -07:00
Glenn Jocher
4cf7d487a6
Update plots.py ( #5127 )
2021-10-11 01:59:22 -07:00
Glenn Jocher
276b674513
Fix SKU-110K HUB: `OSError` ( #5106 )
2021-10-09 00:12:59 -07:00
Egor Orel
48b00dbc0d
Re-open IP-camera videostream if disconnected ( #5074 )
...
* Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability
* Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability
* `self.imgs[i] *= 0` bug fix and cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-07 23:26:43 -07:00
Glenn Jocher
57ce73cd4f
Update datasets.py comments ( #5088 )
2021-10-07 16:04:08 -07:00
Glenn Jocher
070af88108
Fix `yaml.safe_load()` ignore emoji errors ( #5060 )
2021-10-05 13:41:52 -07:00
Zhiqiang Wang
1922ddeac0
Fix pylint: do not use bare 'except' ( #5025 )
...
* Fix E722, do not use bare 'except'
* Remove used codes
* Add FileNotFoundError in LoadImagesAndLabels
* Remove AssertionError
* Ignore LoadImagesAndLabels
* Ignore downloads.py
* Ignore torch_utils.py
* Ignore train.py
* Ignore datasets.py
* Enable utils/download.py
* Fixing exception in thop
* Remove unused code
* Fixing exception in LoadImagesAndLabels
* Fixing exception in exif_size
* Fixing exception in parse_model
* Ignore exceptions in requests
* Revert the exception as suggested
* Revert the exception as suggested
2021-10-03 17:54:40 -07:00
Glenn Jocher
ba99092304
Update W&B README ( #5006 )
2021-09-30 00:35:00 -07:00
Kalen Michael
76d301bd21
Fix URL parsing bug ( #4998 )
...
* added callbacks
* added back callback to main
* added save_dir to callback output
* merged in upstream
* removed ghost code
* fixed parsing error for google temp links
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-29 10:48:45 -07:00
Diego Montes
0c87478713
Update wandb_utils.py ( #4953 )
...
`is_valset_wandb_artifact` and `is_trainset_wandb_artifact` were referenced before assignment causing wandb to be unusable.
2021-09-28 12:22:31 -07:00
Diego Montes
c1bed601e9
Fix `isascii()` method calls for python 3.6 ( #4958 )
...
* fix isascii for python3.6
* update comment with python 3.7 note
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-27 20:16:23 -07:00
Glenn Jocher
a820b43aca
Automatic Chinese fonts plotting ( #4951 )
...
* Automatic Chinese fonts plotting
* Default PIL=False
2021-09-27 13:48:15 -07:00
Glenn Jocher
5a8e4343d8
Scope `check_file()` search space ( #4933 )
...
`check_file()` is now limited to searching opt-in directories: /data, /models, /utils. This prevents large non-project directories like /.git and /venv from being searched, which may cause `check_file()` to slow significantly.
2021-09-26 17:11:46 -07:00
Glenn Jocher
793383232f
Update default Albumentations ( #4931 )
2021-09-26 12:10:33 -07:00
Glenn Jocher
39c17ce0b9
Fix `root` referenced before assignment ( #4920 )
...
* Fix `root` referenced before assignment
Fix for bug introduced by #4919 discovered on VOC autodownload:
```
python train.py --data VOC.yaml
```
* Cleanup
2021-09-25 09:16:14 -07:00
Glenn Jocher
a64a4c839f
Replace `os.system('unzip file.zip')` -> `ZipFile.extractall()` ( #4919 )
...
* Replace `os.system('unzip file.zip')` -> `ZipFile.extractall()`
* Cleanup
2021-09-25 08:52:36 -07:00
Jiacong Fang
ce7fa81d4e
Avoid out-of-image class labels ( #4902 )
...
* Avoid out-of-image class labels
* Update plots.py
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-24 09:23:28 -07:00
Ayush Chaurasia
59aae85a7e
W&B: Fix dataset check ( #4879 )
...
* evolve fix
* Enable login timeout
* fix pkg
* check rank
* don't relogin
* fix
* reformat
2021-09-21 20:02:32 +02:00
Ayush Chaurasia
9febea79de
W&B: Login only in master processes ( #4866 )
...
* evolve fix
* Enable login timeout
* fix pkg
* check rank
* don't relogin
2021-09-20 16:19:34 +02:00
Glenn Jocher
8ad9e4ed5b
Annotator `check_font()` RANK -1 remove progress ( #4864 )
...
* Annotator `check_font()` RANK -1 remove progress
* Cleanup
2021-09-20 13:57:23 +02:00
Glenn Jocher
4c839eeb10
Simplify `check_requirements()` usage ( #4855 )
...
* Simplify `check_requirements()` usage
* remove assert, print()
2021-09-18 18:34:30 +02:00
Glenn Jocher
4d1a2ac87e
Update `sys.path.append(str(ROOT))` ( #4852 )
...
* Update `sys.path.append(str(ROOT))`
* Cleanup
2021-09-18 15:02:08 +02:00
Glenn Jocher
3732f9ac8a
Refactor argparser printing to `print_args()` ( #4850 )
...
* Refactor argparser printing to `print_args()`
* Cleanup
2021-09-18 14:16:19 +02:00
Glenn Jocher
84bfa89236
Consolidate `init_seeds()` ( #4849 )
2021-09-18 13:28:42 +02:00
Ayush Chaurasia
302a1b0bb0
W&B: Enable login timeout ( #4843 )
...
* evolve fix
* Enable login timeout
* fix pkg
2021-09-17 18:59:34 +02:00
Glenn Jocher
4fdaec0449
Single `cache_version` definition ( #4846 )
...
Defines dataset labels *.cache version in a single place, fixing a bug introduced in #4845 .
2021-09-17 18:01:52 +02:00
Glenn Jocher
fe39562a5f
Sorted datasets update to `cache_labels()` ( #4845 )
...
PR should produce datasets sorted alphabetically by filename. Cache version incremented to 0.5.
Note: will force a one-time re-caching of existing datasets on first-use.
2021-09-17 17:35:45 +02: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
27a4736e96
Fix val.py study plot ( #4831 )
...
* Fix val.py study plot
* call plot_val_study
* Rename plot_study_txt to plot_val_study
2021-09-16 17:55:58 +02:00
Kalen Michael
43b2817f6e
Feature/fix export on url ( #4823 )
...
* added callbacks
* added back callback to main
* added save_dir to callback output
* merged in upstream
* removed ghost code
* added url check
* Add url2file()
* Update file-only
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-16 13:33:54 +02:00
Jihoon Kim
fcb225c1c8
Shuffle all 4(or 9) images in mosaic augmentation ( #4787 )
...
Thank you for sharing nice open-source codes 👍
I applied to shuffle the order of all 4(or 9) images in mosaic augmentation
Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.
2021-09-15 00:57:06 +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
c47be26f34
Replace `path.absolute()` with `path.resolve()` ( #4763 )
2021-09-11 22:46:33 +02:00
Glenn Jocher
cd810c8286
Centralize `user_config_dir()` decision making ( #4755 )
2021-09-11 16:32:08 +02:00
Glenn Jocher
22ee6fb7c1
Update `is_writeable()` for 2 methods ( #4744 )
...
* Writeable test
* Fix
* Cleanup
2021-09-10 17:52:33 +02:00
Glenn Jocher
a144536f88
Fix `is_writeable()` for 3 OS support ( #4743 )
...
* Fix `is_writeable()` for 3 OS support
* Update general.py
2021-09-10 17:06:22 +02:00
Josh Veitch-Michaelis
19e28e3bfe
Add `callbacks` to train function in W&B sweep ( #4742 )
...
* add callbacks to train function in wandb sweep
Fix following https://github.com/ultralytics/yolov5/pull/4688 which modified the function signature to `train`
* Cleanup
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-10 16:28:52 +02:00
Glenn Jocher
4a025ae97f
Fix `user_config_dir()` for GCP/AWS functions ( #4726 )
...
* Fix `user_config_dir()` for GCP/AWS functions
Compatability fix for GCP functions and AWS lambda for user config directory in https://github.com/ultralytics/yolov5/pull/4628
* Windows skip check
2021-09-09 17:57:46 +02:00
JD Costa
deb434aefa
Make CONFIG_DIR configurable per environment variable ( #4727 )
2021-09-09 15:29:18 +02:00
Glenn Jocher
8e94bf62d9
Add `user_config_dir('Ultralytics')` ( #4715 )
...
* Add `user_config_dir`
* Linux to .config
2021-09-08 18:13:59 +02:00
Glenn Jocher
25a7e1dae5
Update `check_yaml()` comment ( #4713 )
...
* Update `check_yaml()` comment
* Cleanup
2021-09-08 16:01:03 +02:00
Glenn Jocher
f984cce52a
Fix `check_suffix()` ( #4712 )
...
Fix a bug when `file=''`
2021-09-08 15:06:31 +02:00
Glenn Jocher
a2b3c71636
Add suffix checks ( #4711 )
...
* Add suffix checks
* Cleanup
* Cleanup2
* Cleanup3
2021-09-08 14:36:12 +02:00
Zhiqiang Wang
8e5f9ddbdb
Remove redundant `ComputeLoss` code ( #4701 )
2021-09-08 12:48:33 +02:00
Kalen Michael
2317f86ca4
Optimised Callback Class to Reduce Code and Fix Errors ( #4688 )
...
* added callbacks
* added back callback to main
* added save_dir to callback output
* reduced code count
* updated callbacks
* added default callback class to main, added missing parameters to on_model_save
* Glenn updates
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-09-07 18:32:15 +02:00
Glenn Jocher
548745181a
EarlyStopper updates ( #4679 )
2021-09-05 19:09:53 +02:00
Glenn Jocher
234e8ae6fa
Fix for `plot_evolve()` string argument ( #4639 )
2021-09-01 15:00:13 +02:00
Glenn Jocher
de534e9221
Fix 3 for Arial.ttf redownloads with hub inference ( #4629 )
...
Fix 3 for Arial.ttf redownloads with hub inference, follow-on to #4628 .
2021-08-31 20:54:10 +02:00
Glenn Jocher
a4e8f78c5e
Fix 2 for Arial.ttf redownloads with hub inference ( #4628 )
2021-08-31 20:05:17 +02:00
Glenn Jocher
ba0f80874f
Fix for Arial.ttf redownloads with hub inference ( #4627 )
2021-08-31 15:01:41 +02:00
Glenn Jocher
50a9828679
DDP `torch.jit.trace()` `--sync-bn` fix ( #4615 )
...
* Remove assert
* debug0
* trace=not opt.sync
* sync to sync_bn fix
* Cleanup
2021-08-30 18:35:07 +02:00
Glenn Jocher
bb5ebc290e
Close `matplotlib` plots after opening ( #4612 )
...
* Close plots
* Replace fig.close() for plt.close()
2021-08-30 17:22:21 +02:00
Ayush Chaurasia
11e7c7b48d
W&B: Don't log models in evolve operation ( #4611 )
2021-08-30 17:07:20 +02:00
Glenn Jocher
3a72d4a7e3
Update `check_git_status()` warning ( #4610 )
2021-08-30 17:05:45 +02:00
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
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
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
Takumi Karasawa
7b35971ba5
Fix bug in `plot_one_box` when label is `None` ( #4588 )
2021-08-29 15:08:27 +02:00
Glenn Jocher
bbfafeabdb
Add `Profile()` profiler ( #4587 )
...
* Add `Profile()` profiler
* CamelCase Timeout
2021-08-29 13:49:04 +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
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
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
Ayush Chaurasia
7316b78e36
W&B: Refactor the wandb_utils.py file ( #4496 )
...
* Improve docstrings and run names
* default wandb login prompt with timeout
* return key
* Update api_key check logic
* Properly support zipped dataset feature
* update docstring
* Revert tuorial change
* extend changes to log_dataset
* add run name
* bug fix
* bug fix
* Update comment
* fix import check
* remove unused import
* Hardcore .yaml file extension
* reduce code
* Reformat using pycharm
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Fix
* fix
* refactor constructor
* refactor
* refactor
* refactor
* PyCharm reformat
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-23 13:10:07 +02:00
Huu Quan, CAP
1d65e8194d
Fix missing labels after albumentations ( #4455 )
...
* fix missing labels after augmentation
* Update datasets.py
Cleanup
Co-authored-by: Huu Quan <huuquan@HuuQuans-MacBook.local>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-18 12:07:09 +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
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
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
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
e086347377
Update plots.py ( #4407 )
2021-08-14 12:50:27 +02:00
Glenn Jocher
3e7c59ad3b
Fix rename `utils.google_utils` to `utils.downloads` ( #4393 )
2021-08-11 23:40:47 +02:00
Ayush Chaurasia
a4e4553040
W&B: Fix for 4360 ( #4388 )
...
* Improve docstrings and run names
* default wandb login prompt with timeout
* return key
* Update api_key check logic
* Properly support zipped dataset feature
* update docstring
* Revert tuorial change
* extend changes to log_dataset
* add run name
* bug fix
* bug fix
* Update comment
* fix import check
* remove unused import
* Hardcore .yaml file extension
* reduce code
* Reformat using pycharm
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Fix
* fix
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-11 21:56:25 +02:00
Ayush Chaurasia
75d323dd8b
W&B: Add advanced features tutorial ( #4384 )
...
* Improve docstrings and run names
* default wandb login prompt with timeout
* return key
* Update api_key check logic
* Properly support zipped dataset feature
* update docstring
* Revert tuorial change
* extend changes to log_dataset
* add run name
* bug fix
* bug fix
* Update comment
* fix import check
* remove unused import
* Hardcore .yaml file extension
* reduce code
* Reformat using pycharm
* Remove redundant try catch
* More refactoring and bug fixes
* retry
* Reformat using pycharm
* respect LOGGERS include list
* Initial readme update
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-08-11 18:35:43 +02:00
Sudhanshu Singh
f409d8e54f
Update README.md ( #4309 )
...
remove unnecessary "`"
2021-08-04 22:11:48 +02:00