v6.0 - YOLOv5n 'Nano' models, Roboflow integration, TensorFlow export, OpenCV DNN support
This release incorporates many new features and bug fixes (465 PRs from 73 contributors) since our last release v5.0 in April, brings architecture tweaks, and also introduces new P5 and P6 'Nano' models: YOLOv5n and YOLOv5n6. Nano models maintain the YOLOv5s depth multiple of 0.33 but reduce the YOLOv5s width multiple from 0.50 to 0.25, resulting in ~75% fewer parameters, from 7.5M to 1.9M, ideal for mobile and CPU solutions.
Example usage:
python detect.py --weights yolov5n.pt --img 640 # Nano P5 model trained at --img 640 (28.4 [email protected]:0.95)
python detect.py --weights yolov5n6.pt --img 1280 # Nano P6 model trained at --img 1280 (34.0 mAP0.5:0.95)
Important Updates
-
Roboflow Integration β NEW: Train YOLOv5 models directly on any Roboflow dataset with our new integration! (#4975 by @Jacobsolawetz)
-
YOLOv5n 'Nano' models β NEW: New smaller YOLOv5n (1.9M params) model below YOLOv5s (7.5M params), exports to 2.1 MB INT8 size, ideal for ultralight mobile solutions. (#5027 by @glenn-jocher)
-
TensorFlow and Keras Export: TensorFlow, Keras, TFLite, TF.js model export now fully integrated using
python export.py --include saved_model pb tflite tfjs
(#1127 by @zldrobit) -
OpenCV DNN: YOLOv5 ONNX models are now compatible with both OpenCV DNN and ONNX Runtime (#4833 by @SamFC10).
-
Model Architecture: Updated backbones are slightly smaller, faster and more accurate.
- Replacement of
Focus()
with an equivalentConv(k=6, s=2, p=2)
layer (#4825 by @thomasbi1) for improved exportability - New
SPPF()
replacement forSPP()
layer for reduced ops (#4420 by @glenn-jocher) - Reduction in P3 backbone layer
C3()
repeats from 9 to 6 for improved speeds - Reorder places
SPPF()
at end of backbone - Reintroduction of shortcut in the last
C3()
backbone layer - Updated hyperparameters with increased mixup and copy-paste augmentation
- Replacement of
New Results
Figure Notes (click to expand)
- COCO AP val denotes [email protected]:0.95 metric measured on the 5000-image COCO val2017 dataset over various inference sizes from 256 to 1536.
- GPU Speed measures average inference time per image on COCO val2017 dataset using a AWS p3.2xlarge V100 instance at batch-size 32.
- EfficientDet data from google/automl at batch size 8.
- Reproduce by
python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt
mAP improves from +0.3% to +1.1% across all models, and ~5% FLOPs reduction produces slight speed improvements and a reduced CUDA memory footprint. Example YOLOv5l before and after metrics:
YOLOv5l Large |
size (pixels) |
mAPval 0.5:0.95 |
mAPval 0.5 |
Speed CPU b1 (ms) |
Speed V100 b1 (ms) |
Speed V100 b32 (ms) |
params (M) |
FLOPs @640 (B) |
---|---|---|---|---|---|---|---|---|
v5.0 (previous) | 640 | 48.2 | 66.9 | 457.9 | 11.6 | 2.8 | 47.0 | 115.4 |
v6.0 (this release) | 640 | 48.8 | 67.2 | 424.5 | 10.9 | 2.7 | 46.5 | 109.1 |
Pretrained Checkpoints
Model | size (pixels) |
mAPval 0.5:0.95 |
mAPval 0.5 |
Speed CPU b1 (ms) |
Speed V100 b1 (ms) |
Speed V100 b32 (ms) |
params (M) |
FLOPs @640 (B) |
---|---|---|---|---|---|---|---|---|
YOLOv5n | 640 | 28.4 | 46.0 | 45 | 6.3 | 0.6 | 1.9 | 4.5 |
YOLOv5s | 640 | 37.2 | 56.0 | 98 | 6.4 | 0.9 | 7.2 | 16.5 |
YOLOv5m | 640 | 45.2 | 63.9 | 224 | 8.2 | 1.7 | 21.2 | 49.0 |
YOLOv5l | 640 | 48.8 | 67.2 | 430 | 10.1 | 2.7 | 46.5 | 109.1 |
YOLOv5x | 640 | 50.7 | 68.9 | 766 | 12.1 | 4.8 | 86.7 | 205.7 |
YOLOv5n6 | 1280 | 34.0 | 50.7 | 153 | 8.1 | 2.1 | 3.2 | 4.6 |
YOLOv5s6 | 1280 | 44.5 | 63.0 | 385 | 8.2 | 3.6 | 16.8 | 12.6 |
YOLOv5m6 | 1280 | 51.0 | 69.0 | 887 | 11.1 | 6.8 | 35.7 | 50.0 |
YOLOv5l6 | 1280 | 53.6 | 71.6 | 1784 | 15.8 | 10.5 | 76.8 | 111.4 |
YOLOv5x6 + TTA |
1280 1536 |
54.7 55.4 |
72.4 72.3 |
3136 - |
26.2 - |
19.4 - |
140.7 - |
209.8 - |
Table Notes (click to expand)
- All checkpoints are trained to 300 epochs with default settings. Nano models use hyp.scratch-low.yaml hyperparameters, all others use hyp.scratch-high.yaml.
- mAPval values are for single-model single-scale on COCO val2017 dataset.
Reproduce bypython val.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65
- Speed averaged over COCO val images using a AWS p3.2xlarge instance. NMS times (~1 ms/img) not included.
Reproduce bypython val.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45
- TTA Test Time Augmentation includes reflection and scale augmentations.
Reproduce bypython val.py --data coco.yaml --img 1536 --iou 0.7 --augment
Changelog
Changes between previous release and this release: v5.0...v6.0
Changes since this release: v6.0...HEAD
New Features and Bug Fixes (465)
- YOLOv5 v5.0 Release patch 1 by @glenn-jocher in #2764
- Flask REST API Example by @robmarkcole in #2732
- ONNX Simplifier by @glenn-jocher in #2815
- YouTube Bug Fix by @glenn-jocher in #2818
- PyTorch Hub cv2 .save() .show() bug fix by @glenn-jocher in #2831
- Create FUNDING.yml by @glenn-jocher in #2832
- Update FUNDING.yml by @glenn-jocher in #2833
- Fix ONNX dynamic axes export support with onnx simplifier, make onnx simplifier optional by @timstokman in #2856
- Update increment_path() to handle file paths by @glenn-jocher in #2867
- Detection cropping+saving feature addition for detect.py and PyTorch Hub by @Ab-Abdurrahman in #2827
- Implement yaml.safe_load() by @glenn-jocher in #2876
- Cleanup load_image() by @JoshSong in #2871
- bug fix: switched rows and cols for correct detections in confusion matrix by @MichHeilig in #2883
- VisDrone2019-DET Dataset Auto-Download by @glenn-jocher in #2882
- Uppercase model filenames enabled by @r-blmnr in #2890
- ACON activation function by @glenn-jocher in #2893
- Explicit opt function arguments by @fcakyon in #2817
- Update yolo.py by @glenn-jocher in #2899
- Update google_utils.py by @glenn-jocher in #2900
- Add detect.py --hide-conf --hide-labels --line-thickness options by @Ashafix in #2658
- Default optimize_for_mobile() on TorchScript models by @glenn-jocher in #2908
- Update export.py onnx -> ct print bug fix by @glenn-jocher in #2909
- Update export.py for 2 dry runs by @glenn-jocher in #2910
- Add file_size() function by @glenn-jocher in #2911
- Update download() for tar.gz files by @glenn-jocher in #2919
- Update visdrone.yaml bug fix by @glenn-jocher in #2921
- changed default value of hide label argument to False by @albinxavi in #2923
- Change default value of hide-conf argument to false by @albinxavi in #2925
- test.py native --single-cls by @glenn-jocher in #2928
- Add verbose option to pytorch hub models by @NanoCode012 in #2926
- ACON Activation batch-size 1 bug patch by @glenn-jocher in #2901
- Check_requirements() enclosing apostrophe bug fix by @glenn-jocher in #2929
- Update README.md by @BZFYS in #2934
- Improved yolo.py profiling by @glenn-jocher in #2940
- Add yolov5/ to sys.path() for *.py subdir exec by @glenn-jocher in #2949
- New Colors() class by @glenn-jocher in #2963
- Update restapi.py by @glenn-jocher in #2967
- Global Wheat Detection 2020 Dataset Auto-Download by @glenn-jocher in #2968
- Objects365 Dataset AutoDownload by @ferdinandl007 in #2932
- Update check_requirements() exclude list by @glenn-jocher in #2974
- Make cache saving optional by @glenn-jocher in #2977
- YOLOv5 AWS Inferentia Inplace compatibility updates by @jluntamazon in #2953
- PyTorch Hub load directly when possible by @glenn-jocher in #2986
- Improve performance of dataset Logger by @AyushExel in #2943
- Add unzip flag to download() by @glenn-jocher in #3002
- Curl update by @glenn-jocher in #3004
- Update hubconf.py for unified loading by @glenn-jocher in #3005
- hubconf.py bug fix by @glenn-jocher in #3007
- Added support for fp16 (half) to export.py by @hodovo in #3010
- Add is_colab() function by @glenn-jocher in #3018
- Add NMS threshold checks by @glenn-jocher in #3020
- Fix ONNX export using --grid --simplify --dynamic simultaneously by @jylink in #2982
- download() ThreadPool update by @glenn-jocher in #3027
- FROM nvcr.io/nvidia/pytorch:21.04-py3 by @glenn-jocher in #3030
- Fix #3031 : use check_file for --data by @AyushExel in #3035
- Add get_coco128.sh for downloading the coco128 dataset by @zldrobit in #3047
- Do not optimize CoreML TorchScript model by @glenn-jocher in #3055
- Fixed #3042 by @kepler62f in #3058
- Update export.py with --train mode argument by @glenn-jocher in #3066
- Explicitly convert artifact path to posix_path by @AyushExel in #3067
- Update P5 + P6 model ensembling by @glenn-jocher in #3082
- Update detect.py by @glenn-jocher in #3087
- Add check_python() by @glenn-jocher in #3088
- Add --optimize argument by @glenn-jocher in #3093
- Update train.py by @glenn-jocher in #3099
- Update GlobalWheat2020.yaml test: # 1276 images by @glenn-jocher in #3101
- detect.py streaming source
--save-crop
bug fix by @glenn-jocher in #3102 - Replace print() with logging.info() in trainloader by @glenn-jocher in #3103
- New Ultralytics Colors() Palette by @glenn-jocher in #3046
- Update JSON response by @glenn-jocher in #3139
- Update https://ultralytics.com/images/zidane.jpg by @glenn-jocher in #3140
- Add yolov5/init.py by @KC-Zhang in #3127
- Add
--include torchscript onnx coreml
argument by @CristiFati in #3137 - TorchScript, ONNX, CoreML Export tutorial title by @glenn-jocher in #3142
- Update requirements.txt
onnx>=1.9.0
by @glenn-jocher in #3143 - Scope imports for torch.hub.list() improvement by @glenn-jocher in #3144
- Scope all hubconf.py imports for torch.hub.list() by @glenn-jocher in #3145
- SKU-110K CVPR2019 Dataset Auto-Download by @glenn-jocher in #3167
- rename class autoShape -> AutoShape by @developer0hye in #3173
- Parameterize ONNX
--opset-version
by @CristiFati in #3154 - Add
device
argument to PyTorch Hub models by @cgerum in #3104 - Plot labels.png histogram colors by @glenn-jocher in #3192
- Add CAP_PROP_FRAME_COUNT for YouTube sources by @glenn-jocher in #3193
- Silent List Bug Fix by @glenn-jocher in #3214
- 0 FPS stream bug fix by @glenn-jocher in #3216
- Parameterize max_det + inference default at 1000 by @adrianholovaty in #3215
- TensorBoard add_graph() fix by @glenn-jocher in #3236
plot_one_box()
defaultcolor=(128, 128, 128)
by @yeric1789 in #3240- Add Cython by @glenn-jocher in #3217
- Check CoreML models.train() mode by @glenn-jocher in #3262
- Assert
--image-weights
not combined with DDP by @glenn-jocher in #3275 - check
batch_size % utilized_device_count
by @glenn-jocher in #3276 - YouTube stream ending fix by @glenn-jocher in #3277
- Fix TypeError: 'PosixPath' object is not iterable by @glenn-jocher in #3285
- Improves docs and handling of entities and resuming by WandbLogger by @charlesfrye in #3264
- Update LoadStreams init fallbacks by @glenn-jocher in #3295
- PyTorch Hub
crops = results.crop()
return values by @yeric1789 in #3282 - Comment Cython by @glenn-jocher in #3297
- Improved check_requirements() robustness by @glenn-jocher in #3298
- Explicit
git clone
master by @glenn-jocher in #3311 - Implement
@torch.no_grad()
decorator by @glenn-jocher in #3312 - Remove www subdomain from https://ultralytics.com by @glenn-jocher in #3320
- TensorBoard DP/DDP graph fix by @glenn-jocher in #3325
- yolo.py header by @glenn-jocher in #3347
- Updated cache v0.2 with
hashlib
by @glenn-jocher in #3350 - Add URL file download to check_file() by @glenn-jocher in #3330
- ONNX export in
.train()
mode fix by @ChaofWang in #3362 - Ignore blank lines in
*.txt
labels by @glenn-jocher in #3366 - update ci-testing.yml by @SkalskiP in #3322
- Enable direct
--weights URL
definition by @glenn-jocher in #3373 - Add Open in Kaggle badge by @pizzaz93 in #3368
cv2.imread(img, -1)
for IMREAD_UNCHANGED by @tudoulei in #3379- COCO evolution fix by @glenn-jocher in #3388
- Create
is_pip()
function by @glenn-jocher in #3391 - Revert "
cv2.imread(img, -1)
for IMREAD_UNCHANGED" by @glenn-jocher in #3395 - Update FLOPs description. by @chocosaj in #3422
- Parse URL authentication by @glenn-jocher in #3424
- Add FLOPs title to table by @glenn-jocher in #3453
- Suppress jit trace warning + graph once by @glenn-jocher in #3454
- Update MixUp augmentation
alpha=beta=32.0
by @glenn-jocher in #3455 - Add
timeout()
class by @glenn-jocher in #3460 - Faster HSV augmentation by @developer0hye in #3462
- Add
check_git_status()
5 second timeout by @glenn-jocher in #3464 - Improved
check_requirements()
offline-handling by @glenn-jocher in #3466 - Add
output_names
argument for ONNX export with dynamic axes by @SamSamhuns in #3456 - Revert FP16
test.py
anddetect.py
inference to FP32 default by @edificewang in #3423 - Add additional links/resources to stale.yml message by @glenn-jocher in #3467
- Update stale.yml HUB URL by @glenn-jocher in #3468
- Stale
github.actor
bug fix by @glenn-jocher in #3483 - Explicit
model.eval()
callif opt.train=False
by @developer0hye in #3475 - check_requirements() exclude
opencv-python
by @glenn-jocher in #3495 - check_requirements() exclude
opencv-python
by @glenn-jocher in #3507 - early assert for cpu and half option by @developer0hye in #3508
- Update tutorial.ipynb by @glenn-jocher in #3510
- Reduce test.py results spacing by @glenn-jocher in #3511
- Update README.md by @glenn-jocher in #3512
- Merge
develop
branch intomaster
by @glenn-jocher in #3518 - Use multi-threading in cache_labels by @deanmark in #3505
- Update datasets.py by @glenn-jocher in #3531
- Update FP16
--half
argument for test.py and detect.py by @glenn-jocher in #3532 - Update
dataset_stats()
for HUB by @glenn-jocher in #3536 - On-demand
pycocotools
pip install by @glenn-jocher in #3547 - Update
check_python(minimum=3.6.2)
by @glenn-jocher in #3548 - Update README.md by @glenn-jocher in #3550
- Remove
opt
from `create_dataloader()`` by @glenn-jocher in #3552 - Remove
is_coco
argument fromtest()
by @glenn-jocher in #3553 - Multi-GPU default to single device 0 by @glenn-jocher in #3554
- Update test.py profiling by @glenn-jocher in #3555
- Remove redundant speed/study
half
argument by @glenn-jocher in #3557 - Bump pip from 18.1 to 19.2 in /utils/google_app_engine by @dependabot in #3561
- Refactor test.py arguments by @glenn-jocher in #3558
- Refactor detect.py arguments by @glenn-jocher in #3559
- Refactor models/export.py arguments by @glenn-jocher in #3564
- Refactoring cleanup by @glenn-jocher in #3565
- Ignore Seaborn plot warnings by @glenn-jocher in #3576
- Update export.py, yolo.py
sys.path.append()
by @glenn-jocher in #3579 - Update stale.yml by @glenn-jocher in #3585
- Add ConfusionMatrix
normalize=True
flag by @glenn-jocher in #3586 - ConfusionMatrix
normalize=True
fix by @glenn-jocher in #3587 - train.py GPU memory fix by @glenn-jocher in #3590
- W&B: Allow changed in config variable by @AyushExel in #3588
- Update
dataset_stats()
by @glenn-jocher in #3593 - Delete init.py by @glenn-jocher in #3596
- Simplify README.md by @kalenmike in #3530
- Update datasets.py by @masoodazhar in #3591
- Download COCO and VOC by default by @glenn-jocher in #3608
- Suppress wandb images size mismatch warning by @AyushExel in #3611
- Fix incorrect end epoch by @wq9 in #3612
- Update
check_file()
by @glenn-jocher in #3622 - Update README.md by @glenn-jocher in #3624
- FROM nvcr.io/nvidia/pytorch:21.05-py3 by @glenn-jocher in #3633
- Add
**/*.torchscript.pt
by @glenn-jocher in #3634 - Update
verify_image_label()
by @glenn-jocher in #3635 - RUN pip install --no-cache -U torch torchvision by @glenn-jocher in #3637
- Assert non-premature end of JPEG images by @xiaowk5516 in #3638
- Update CONTRIBUTING.md by @glenn-jocher in #3645
- Update CONTRIBUTING.md by @glenn-jocher in #3647
is_coco
list fix by @thanhminhmr in #3646- Update README.md by @SpongeBab in #3650
- Update
dataset_stats()
to list of dicts by @glenn-jocher in #3657 - Remove
/weights
directory by @glenn-jocher in #3659 - Update download_weights.sh comment by @glenn-jocher in #3662
- Update train.py by @glenn-jocher in #3667
- Update
train(hyp, *args)
to accepthyp
file or dict by @glenn-jocher in #3668 - Update TensorBoard by @glenn-jocher in #3669
- Update
WORLD_SIZE
andRANK
retrieval by @glenn-jocher in #3670 - Cache v0.3: improved corrupt image/label reporting by @glenn-jocher in #3676
- EMA changes for pre-model's batch_size by @ZouJiu1 in #3681
- Update README.md by @glenn-jocher in #3684
- Update cache check by @glenn-jocher in #3691
- Skip HSV augmentation when hyperparameters are [0, 0, 0] by @thanhminhmr in #3686
- Slightly modify CLI execution by @lb-desupervised in #3687
- Reformat by @glenn-jocher in #3694
- Update DDP for
torch.distributed.run
withgloo
backend by @glenn-jocher in #3680 - Eliminate
total_batch_size
variable by @glenn-jocher in #3697 - Add torch DP warning by @glenn-jocher in #3698
- Add
train.run()
method by @glenn-jocher in #3700 - Update DDP backend
if dist.is_nccl_available()
by @glenn-jocher in #3705 - [x]W&B: Don't resume transfer learning runs by @AyushExel in #3604
- Update 4 main ops for paths and .run() by @glenn-jocher in #3715
- Fix
img2label_paths()
order by @glenn-jocher in #3720 - Fix typo in export.py by @fcakyon in #3729
- Backwards compatible cache version checks by @glenn-jocher in #3730
- Update
check_datasets()
for dynamic unzip path by @glenn-jocher in #3732 - Create
data/hyps
directory by @glenn-jocher in #3747 - Force non-zero hyp evolution weights
w
by @glenn-jocher in #3748 - edit comment for img2tensor process by @developer0hye in #3759
- Add optional dataset.yaml
path
attribute by @glenn-jocher in #3753 - COCO annotations JSON fix by @glenn-jocher in #3764
- Add
xyxy2xywhn()
by @developer0hye in #3765 - Remove DDP
nn.MultiheadAttention
fix by @glenn-jocher in #3768 - fix/incorrect_fitness_import by @SkalskiP in #3770
- W&B: Update Tables API and comply with new dataset_check by @AyushExel in #3772
- NGA xView 2018 Dataset Auto-Download by @glenn-jocher in #3775
- Update README.md fix banner width by @glenn-jocher in #3785
- Objectness IoU Sort by @glenn-jocher in #3610
- Update objectness IoU sort by @glenn-jocher in #3786
- Create hyp.scratch-p6.yaml by @glenn-jocher in #3787
- Fix datasets for aws and get_coco.sh by @glenn-jocher in #3788
- Update seeds for single-GPU reproducibility by @glenn-jocher in #3789
- Update Usage examples by @glenn-jocher in #3790
- nvcr.io/nvidia/pytorch:21.06-py3 by @glenn-jocher in #3791
- Update Dockerfile by @glenn-jocher in #3792
- FROM nvcr.io/nvidia/pytorch:21.05-py3 by @glenn-jocher in #3794
- Fix competition link by @batrlatom in #3799
- Fix warmup
accumulate
by @yellowdolphin in #3722 - Add feature map visualization by @Zigars in #3804
- Update
feature_visualization()
by @glenn-jocher in #3807 - Fix for
dataset_stats()
with updated data.yaml by @glenn-jocher in #3819 - Move IoU functions to metrics.py by @glenn-jocher in #3820
- Concise
TransformerBlock()
by @glenn-jocher in #3821 - Fix
LoadStreams()
dataloader frame skip issue by @feras-oughali in #3833 - Plot
AutoShape()
detections in ascending order by @glenn-jocher in #3843 - Copy-Paste augmentation for YOLOv5 by @glenn-jocher in #3845
- Add EXIF rotation to YOLOv5 Hub inference by @vaaliferov in #3852
--evolve 300
generations CLI argument by @san-soucie in #3863- Add multi-stream saving feature by @ketan-b in #3864
- Models
*.yaml
reformat by @glenn-jocher in #3875 - Create
utils/augmentations.py
by @glenn-jocher in #3877 - Improved BGR2RGB speeds by @glenn-jocher in #3880
- Evolution commented
hyp['anchors']
fix by @glenn-jocher in #3887 - Hub models
map_location=device
by @glenn-jocher in #3894 - YOLOv5 + Albumentations integration by @glenn-jocher in #3882
- Save PyTorch Hub models to
/root/hub/cache/dir
by @johnohagan in #3904 - Feature visualization update by @glenn-jocher in #3920
- Fix
torch.hub.list('ultralytics/yolov5')
pathlib bug by @glenn-jocher in #3921 - Update
setattr()
default for Hub PIL images by @jmiranda-laplateforme in #3923 feature_visualization()
CUDA fix by @glenn-jocher in #3925- Update
dataset_stats()
for zipped datasets by @glenn-jocher in #3926 - Fix inconsistent NMS IoU value for COCO by @eldarkurtic in #3934
- Feature visualization improvements 32 by @glenn-jocher in #3947
- Update augmentations.py by @glenn-jocher in #3948
- Cache v0.4 update by @glenn-jocher in #3954
- Numerical stability fix for Albumentations by @glenn-jocher in #3958
- Update
albumentations>=1.0.2
by @glenn-jocher in #3966 - Update
np.random.random()
torandom.random()
by @glenn-jocher in #3967 - Update requirements.txt
albumentations>=1.0.2
by @glenn-jocher in #3972 Ensemble()
visualize fix by @seven320 in #3973- Update
probability
top
by @glenn-jocher in #3980 - Alert (no detections) by @glenn-jocher in #3984
- Update README.md by @glenn-jocher in #3996
- Rename
test.py
toval.py
by @glenn-jocher in #4000 - W&B: Proposal for supporting W&B sweeps by @AyushExel in #3938
- Update greetings.yml by @glenn-jocher in #4024
- Add
--sync-bn
known issue by @glenn-jocher in #4032 - Update greetings.yml by @glenn-jocher in #4037
- Update README.md by @glenn-jocher in #4041
- AutoShape PosixPath support by @glenn-jocher in #4047
val.py
refactor by @glenn-jocher in #4053- Module
super().__init__()
by @glenn-jocher in #4065 - Missing
nc
andnames
handling in check_dataset() by @glenn-jocher in #4066 - Albumentations >= 1.0.3 by @glenn-jocher in #4068
- W&B: fix refactor bugs by @AyushExel in #4069
- Refactor
export.py
by @glenn-jocher in #4080 - Addition refactor
export.py
by @glenn-jocher in #4089 - Add train.py
--img-size
floor by @glenn-jocher in #4099 - Update resume.py by @glenn-jocher in #4115
- Fix indentation in
log_training_progress()
by @imyhxy in #4126 - Update README.md by @glenn-jocher in #4134
- detect.py ONNX inference feature by @glenn-jocher in #4073
- Rename
opset_version
toopset
by @glenn-jocher in #4135 - Update train.py by @glenn-jocher in #4136
- Refactor train.py and val.py
loggers
by @glenn-jocher in #4137 - Update README.md by @glenn-jocher in #4143
- Add
export.py
ONNX inference suggestion by @glenn-jocher in #4146 - New CSV Logger by @glenn-jocher in #4148
- Update dataset comments by @glenn-jocher in #4162
- Update script headers by @glenn-jocher in #4163
- W&B: Improve documentation of the logger & use wandb assigned run names by default by @AyushExel in #4174
- Update comments header by @glenn-jocher in #4184
- Train from
--data path/to/dataset.zip
feature by @glenn-jocher in #4185 - Create yolov5-bifpn.yaml by @glenn-jocher in #4195
- Update Hub Path inputs by @glenn-jocher in #4200
- W&B: Restructure code to support the new dataset_check() feature by @AyushExel in #4197
- Update yolov5-bifpn.yaml by @glenn-jocher in #4208
- W&B: More improvements and refactoring by @AyushExel in #4205
- PyCharm reformat by @glenn-jocher in #4209
- Add
@try_except
decorator by @glenn-jocher in #4224 - Explicit
requirements.txt
location by @glenn-jocher in #4225 - Suppress torch 1.9.0
max_pool2d()
warning by @glenn-jocher in #4227 - Fix weight decay comment by @glenn-jocher in #4228
- Update profiler by @glenn-jocher in #4236
- Add
python train.py --freeze N
argument by @IneovaAI in #4238 - Update
profile()
for CUDA Memory allocation by @glenn-jocher in #4239 - Add
train.py
andval.py
callbacks by @kalenmike in #4220 - W&B: suppress warnings by @AyushExel in #4257
- Update AP calculation by @glenn-jocher in #4260
- Update Autoshape forward header by @glenn-jocher in #4271
- Update variables by @glenn-jocher in #4273
- Add
DWConvClass()
by @glenn-jocher in #4274 - Update 'results saved to' string by @glenn-jocher in #4275
- W&B: Fix sweep bug by @AyushExel in #4276
- Feature
python train.py --cache disk
by @junjihashimoto in #4049 - Fixed logging level in distributed mode by @imyhxy in #4284
- Simplify callbacks by @glenn-jocher in #4289
- Evolve in CSV format by @glenn-jocher in #4307
- Update newline by @glenn-jocher in #4308
- Update README.md by @Justsubh01 in #4309
- Simpler code for DWConvClass by @developer0hye in #4310
int(mlc)
by @glenn-jocher in #4385- fix module count in parse_model by @orangeccc in #4379
- Update README.md by @glenn-jocher in #4387
- W&B: Add advanced features tutorial by @AyushExel in #4384
- W&B: Fix for 4360 by @AyushExel in #4388
- Fix rename
utils.google_utils
toutils.downloads
by @glenn-jocher in #4393 - Simplify ONNX inference command by @glenn-jocher in #4405
- No cache option for reading datasets by @ahmadmustafaanis in #4376
- Update plots.py PIL box plotting by @glenn-jocher in #4407
- Add
yolov5s-ghost.yaml
by @glenn-jocher in #4412 - Remove
encoding='ascii'
by @glenn-jocher in #4413 - Merge PIL and OpenCV in
plot_one_box(use_pil=False)
by @glenn-jocher in #4416 - Standardize headers and docstrings by @glenn-jocher in #4417
- Add
SPPF()
layer by @glenn-jocher in #4420 - Remove DDP process group timeout by @glenn-jocher in #4422
- Update hubconf.py
attempt_load
import by @OmidSa75 in #4428 - TFLite preparation by @glenn-jocher in #4436
- Add TensorFlow and TFLite export by @zldrobit in #1127
- Fix default
--weights yolov5s.pt
by @glenn-jocher in #4458 - Fix missing labels after albumentations by @huuquan1994 in #4455
check_requirements(('coremltools',))
by @glenn-jocher in #4478- W&B: Refactor the wandb_utils.py file by @AyushExel in #4496
- Add
install=True
argument tocheck_requirements
by @glenn-jocher in #4512 - Automatic TFLite uint8 determination by @glenn-jocher in #4515
- Fix for
python models/yolo.py --profile
by @glenn-jocher in #4541 - Auto-fix corrupt JPEGs by @glenn-jocher in #4548
- Fix for corrupt JPEGs auto-fix PR by @glenn-jocher in #4560
- Fix for AP calculation limits 0.0 - 1.0 by @glenn-jocher in #4563
- ONNX opset 13 by @glenn-jocher in #4566
- Add EarlyStopping feature by @glenn-jocher in #4576
- Remove
image_weights
DDP code by @glenn-jocher in #4579 - Add
Profile()
profiler by @glenn-jocher in #4587 - Fix bug in
plot_one_box
when label isNone
by @karasawatakumi in #4588 - Create
Annotator()
class by @glenn-jocher in #4591 - Auto-UTF handling by @glenn-jocher in #4594
- Re-order
plots.py
to class-first by @glenn-jocher in #4595 - Update mosaic plots font size by @glenn-jocher in #4596
- TensorBoard
on_train_end()
speed improvements by @glenn-jocher in #4605 - Auto-download Arial.ttf on init by @glenn-jocher in #4606
- Fix: add P2 layer 21 to yolov5-p2.yaml
Detect()
inputs by @YukunXia in #4608 - Update
check_git_status()
warning by @glenn-jocher in #4610 - W&B: Don't log models in evolve operation by @AyushExel in #4611
- Close
matplotlib
plots after opening by @glenn-jocher in #4612 - DDP
torch.jit.trace()
--sync-bn
fix by @glenn-jocher in #4615 - Fix for Arial.ttf redownloads with hub inference by @glenn-jocher in #4627
- Fix 2 for Arial.ttf redownloads with hub inference by @glenn-jocher in #4628
- Fix 3 for Arial.ttf redownloads with hub inference by @glenn-jocher in #4629
- Fix for
plot_evolve()
string argument by @glenn-jocher in #4639 - Fix
is_coco
on missingdata['val']
key by @glenn-jocher in #4642 - Fixed 'meta' and 'hyp' may out of order when using evolve by @imyhxy in #4657
- EarlyStopper updates by @glenn-jocher in #4679
- Optimised Callback Class to Reduce Code and Fix Errors by @kalenmike in #4688
- Remove redundant
ComputeLoss
code by @zhiqwang in #4701 - Add suffix checks by @glenn-jocher in #4711
- Fix
check_suffix()
by @glenn-jocher in #4712 - Update
check_yaml()
comment by @glenn-jocher in #4713 - Add
user_config_dir('Ultralytics')
by @glenn-jocher in #4715 - Add
crops = results.crop()
dictionary by @ELHoussineT in #4676 - Make CONFIG_DIR configurable per environment variable by @joaodiogocosta in #4727
- Allow
multi_label
option for NMS with PyTorch Hub by @jeanbmar in #4728 - Scope
onnx-simplifier
requirements check by @Zegorax in #4730 - Fix
user_config_dir()
for GCP/AWS functions by @glenn-jocher in #4726 - Fix
--data from_HUB.zip
by @glenn-jocher in #4732 - Improved
detect.py
timing by @glenn-jocher in #4741 - Add
callbacks
to train function in W&B sweep by @jveitchmichaelis in #4742 - Fix
is_writeable()
for 3 OS support by @glenn-jocher in #4743 - Add TF and TFLite models to
.gitignore
by @glenn-jocher in #4747 - Add TF and TFLite models to
.dockerignore
by @glenn-jocher in #4748 - Update
is_writeable()
for 2 methods by @glenn-jocher in #4744 - Centralize
user_config_dir()
decision making by @glenn-jocher in #4755 - Replace
path.absolute()
withpath.resolve()
by @glenn-jocher in #4763 - Add TensorFlow formats to
export.py
by @glenn-jocher in #4479 - Update ci-testing.yml by @glenn-jocher in #4770
- Update ci-testing.yml by @glenn-jocher in #4772
- Shuffle all 4(or 9) images in mosaic augmentation by @kimnamu in #4787
- Add
--int8
argument by @glenn-jocher in #4799 - Evolution
--resume
fix by @glenn-jocher in #4802 - Refactor
forward()
method profiling by @glenn-jocher in #4816 - Feature/fix export on url by @kalenmike in #4823
- Fix 'PyTorch starting from' for URL weights by @glenn-jocher in #4828
- Multiple TF export improvements by @zldrobit in #4824
- Fix val.py study plot by @glenn-jocher in #4831
PIL.ImageDraw.text(anchor=...)
removal, reduce to>=7.1.2
by @glenn-jocher in #4842- Sorted datasets update to
cache_labels()
by @glenn-jocher in #4845 - Single
cache_version
definition by @glenn-jocher in #4846 - W&B: Enable login timeout by @AyushExel in #4843
- Consolidate
init_seeds()
by @glenn-jocher in #4849 - Refactor argparser printing to
print_args()
by @glenn-jocher in #4850 - Update
sys.path.append(str(ROOT))
by @glenn-jocher in #4852 - Simplify
check_requirements()
usage by @glenn-jocher in #4855 - Update greetings.yml by @glenn-jocher in #4856
- Update Dockerfile by @glenn-jocher in #4861
- Update Dockerfile by @glenn-jocher in #4862
- Fix DDP destruction
LOGGER.info()
by @glenn-jocher in #4863 - Annotator
check_font()
RANK -1 remove progress by @glenn-jocher in #4864 - W&B: Login only in master processes by @AyushExel in #4866
- W&B: Fix dataset check by @AyushExel in #4879
- Fix arg help string to match 'classes' arg name. by @NauchtanRobotics in #4893
- Avoid out-of-image class labels by @zldrobit in #4902
- TensorFlow.js export enhancements by @zldrobit in #4905
- fix zipfile name for coco128-segments by @SamFC10 in #4914
- Replace
os.system('unzip file.zip')
->ZipFile.extractall()
by @glenn-jocher in #4919 - Fix
root
referenced before assignment by @glenn-jocher in #4920 - Add Slack Forum badge to README by @glenn-jocher in #4930
- Validate
best.pt
on train end by @glenn-jocher in #4889 - Update default Albumentations by @glenn-jocher in #4931
- Scope
check_file()
search space by @glenn-jocher in #4933 - Update Dockerfile by @glenn-jocher in #4935
- Automatic Chinese fonts plotting by @glenn-jocher in #4951
- Allow YOLOv5 execution from arbitrary
cwd
by @glenn-jocher in #4954 - Update relative
ROOT
logic by @glenn-jocher in #4955 - Add
roboflow
by @glenn-jocher in #4956 - Fix
isascii()
method calls for python 3.6 by @d57montes in #4958 - Fix relative
ROOT
Pytorch Hub custom model bug by @glenn-jocher in #4974 - Add Roboflow to README by @kalenmike in #4972
- Update wandb_utils.py by @d57montes in #4953
- Add Hub custom models to CI tests by @glenn-jocher in #4978
- Faster
--img 64
CI tests by @glenn-jocher in #4979 - Clickable CI badge by @glenn-jocher in #4985
- Revert
torch.hub.load()
test by @glenn-jocher in #4986 - Fix URL parsing bug by @kalenmike in #4998
- Update W&B README by @glenn-jocher in #5006
- Add YOLOv5 Survey link to README.md by @kalenmike in #5000
- Update train.py by @glenn-jocher in #5014
- Update README.md by @glenn-jocher in #5015
- Compute loss on final val by @glenn-jocher in #5017
- Fix missing
opt.device
on--task study
by @glenn-jocher in #5031 - Fix pylint: do not use bare 'except' by @zhiqwang in #5025
- Clip TTA Augmented Tails by @glenn-jocher in #5028
- Implement
--save-period
locally by @glenn-jocher in #5047 - Fix
yaml.safe_load()
ignore emoji errors by @glenn-jocher in #5060 - Update Dockerfile to
ADD
Arial.ttf by @glenn-jocher in #5084 - Update datasets.py comments by @glenn-jocher in #5088
- Re-open IP-camera videostream if disconnected by @EgOrlukha in #5074
- Fix SKU-110K HUB:
OSError
by @glenn-jocher in #5106 - Add
requests
to requirements.txt by @sandstorm12 in #5112 - Pass
LOCAL_RANK
totorch_distributed_zero_first()
by @qiningonline in #5114 - Fix different devices bug when moving model from GPU to CPU by @SamFC10 in #5110
- Pass
--device
for--task study
by @glenn-jocher in #5118 - Update val.py
--speed
and--study
usages by @glenn-jocher in #5120 - Update val.py
pad = 0.0 if task == 'speed' else 0.5
by @glenn-jocher in #5121 - Update plots.py by @glenn-jocher in #5127
- Fix
ROOT
as relative path by @maltelorbach in #5129 - Refactor
Detect()
anchors for ONNX <> OpenCV DNN compatibility by @SamFC10 in #4833 - Add OpenCV DNN option for ONNX inference by @glenn-jocher in #5136
- update
detect.py
in order to support torch script by @andreiionutdamian in #5109
New Contributors (73)
- @robmarkcole made their first contribution in #2732
- @timstokman made their first contribution in #2856
- @Ab-Abdurrahman made their first contribution in #2827
- @JoshSong made their first contribution in #2871
- @MichHeilig made their first contribution in #2883
- @r-blmnr made their first contribution in #2890
- @fcakyon made their first contribution in #2817
- @Ashafix made their first contribution in #2658
- @albinxavi made their first contribution in #2923
- @BZFYS made their first contribution in #2934
- @ferdinandl007 made their first contribution in #2932
- @jluntamazon made their first contribution in #2953
- @hodovo made their first contribution in #3010
- @jylink made their first contribution in #2982
- @kepler62f made their first contribution in #3058
- @KC-Zhang made their first contribution in #3127
- @CristiFati made their first contribution in #3137
- @cgerum made their first contribution in #3104
- @adrianholovaty made their first contribution in #3215
- @yeric1789 made their first contribution in #3240
- @charlesfrye made their first contribution in #3264
- @ChaofWang made their first contribution in #3362
- @pizzaz93 made their first contribution in #3368
- @tudoulei made their first contribution in #3379
- @chocosaj made their first contribution in #3422
- @SamSamhuns made their first contribution in #3456
- @edificewang made their first contribution in #3423
- @deanmark made their first contribution in #3505
- @dependabot made their first contribution in #3561
- @kalenmike made their first contribution in #3530
- @masoodazhar made their first contribution in #3591
- @wq9 made their first contribution in #3612
- @xiaowk5516 made their first contribution in #3638
- @thanhminhmr made their first contribution in #3646
- @SpongeBab made their first contribution in #3650
- @ZouJiu1 made their first contribution in #3681
- @lb-desupervised made their first contribution in #3687
- @batrlatom made their first contribution in #3799
- @yellowdolphin made their first contribution in #3722
- @Zigars made their first contribution in #3804
- @feras-oughali made their first contribution in #3833
- @vaaliferov made their first contribution in #3852
- @san-soucie made their first contribution in #3863
- @ketan-b made their first contribution in #3864
- @johnohagan made their first contribution in #3904
- @jmiranda-laplateforme made their first contribution in #3923
- @eldarkurtic made their first contribution in #3934
- @seven320 made their first contribution in #3973
- @imyhxy made their first contribution in #4126
- @IneovaAI made their first contribution in #4238
- @junjihashimoto made their first contribution in #4049
- @Justsubh01 made their first contribution in #4309
- @orangeccc made their first contribution in #4379
- @ahmadmustafaanis made their first contribution in #4376
- @OmidSa75 made their first contribution in #4428
- @huuquan1994 made their first contribution in #4455
- @karasawatakumi made their first contribution in #4588
- @YukunXia made their first contribution in #4608
- @zhiqwang made their first contribution in #4701
- @ELHoussineT made their first contribution in #4676
- @joaodiogocosta made their first contribution in #4727
- @jeanbmar made their first contribution in #4728
- @Zegorax made their first contribution in #4730
- @jveitchmichaelis made their first contribution in #4742
- @kimnamu made their first contribution in #4787
- @NauchtanRobotics made their first contribution in #4893
- @SamFC10 made their first contribution in #4914
- @d57montes made their first contribution in #4958
- @EgOrlukha made their first contribution in #5074
- @sandstorm12 made their first contribution in #5112
- @qiningonline made their first contribution in #5114
- @maltelorbach made their first contribution in #5129
- @andreiionutdamian made their first contribution in #5109