v6.2 - YOLOv5 Classification Models, Apple M1, Reproducibility, ClearML and Deci.ai integrations #8996
glenn-jocher
started this conversation in
General
Replies: 3 comments 10 replies
-
will you add keypoint task in this project later? |
Beta Was this translation helpful? Give feedback.
1 reply
-
These release notes refer to 6.3:
It is now late November. Is there any chance of a new tag/release coming soon? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release incorporates 401 PRs from 41 contributors since our last release in February 2022. It adds Classification training, validation, prediction and export (to all 11 formats), and also provides ImageNet-pretrained YOLOv5m-cls, ResNet (18, 34, 50, 101) and EfficientNet (b0-b3) models.
My main goal with this release is to introduce super simple YOLOv5 classification workflows just like our existing object detection models. The new v6.2 YOLOv5-cls models below are just a start, we will continue to improve these going forward together with our existing detection models. We'd love your contributions on this effort!
Our next release, v6.3 is scheduled for September and will bring official instance segmentation support to YOLOv5, with a major v7.0 release later this year updating architectures across all 3 tasks - classification, detection and segmentation.
Important Updates
pip install clearml
will enable the integration and allow users to track every training run in ClearML. This in turn allows users to track and compare runs and even schedule runs remotely. (ClearML experiment tracking integration #8620 by @thepycoder)python utils/benchmarks.py --weights yolov5s.pt --device 0
for GPU benchmarks or--device cpu
for CPU benchmarks (YOLOv5 Export Benchmarks for GPU #6963 by @glenn-jocher).torch>=1.12.0
is now fully reproducible, and a new--seed
argument can be used (default seed=0) (Training reproducibility improvements #8213 by @AyushExel).--device mps
(full functionality is pending torch updates in General MPS op coverage tracking issue pytorch/pytorch#77764) (YOLOv5 Apple Metal Performance Shader (MPS) support #7878 by @glenn-jocher)New Classification Checkpoints
We trained YOLOv5-cls classification models on ImageNet for 90 epochs using a 4xA100 instance, and we trained ResNet and EfficientNet models alongside with the same default training settings to compare. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google Colab Pro for easy reproducibility.
(pixels)
top1
top5
90 epochs
4x A100 (hours)
ONNX-CPU
(ms)
TensorRT-V100
(ms)
(M)
@224 (B)
lr0=0.001
andweight_decay=5e-5
at image size 224 and all default settings.Runs logged to https://wandb.ai/glenn-jocher/YOLOv5-Classifier-v6-2
Reproduce by
python classify/val.py --data ../datasets/imagenet --img 224
Reproduce by
python classify/val.py --data ../datasets/imagenet --img 224 --batch 1
export.py
.Reproduce by
python export.py --weights yolov5s-cls.pt --include engine onnx --imgsz 224
New Classification Model Usage Examples
Train
YOLOv5 classification training supports auto-download of MNIST, Fashion-MNIST, CIFAR10, CIFAR100, Imagenette, Imagewoof, and ImageNet datasets with the
--data
argument. To start training on MNIST for example use--data mnist
.Val
Validate YOLOv5m-cls accuracy on ImageNet-1k dataset:
Predict
Use pretrained YOLOv5s-cls.pt to predict bus.jpg:
Export
Export a group of trained YOLOv5s-cls, ResNet and EfficientNet models to ONNX and TensorRT:
Changelog
🛠️ New Features and Bug Fixes (401)
OMP_NUM_THREADS=8
by @glenn-jocher in DefaultOMP_NUM_THREADS=8
#6770tau
by @glenn-jocher in Update EMA decaytau
#6769*.ts
toVID_FORMATS
by @glenn-jocher in Add*.ts
toVID_FORMATS
#6859--cache disk
deprecate*_npy/
dirs by @glenn-jocher in Update--cache disk
deprecate*_npy/
dirs #6876max_workspace_size
deprecation notice by @glenn-jocher in Fix TRTmax_workspace_size
deprecation notice #6856git_describe()
to general.py by @glenn-jocher in Movegit_describe()
to general.py #6918--half
handling by @glenn-jocher in DetectMultiBackend()--half
handling #6945torch==1.11.0+cu113
by @glenn-jocher in Update Dockerfiletorch==1.11.0+cu113
#6954cuda
variable by @glenn-jocher in New val.pycuda
variable #6957device
update by @glenn-jocher in DetectMultiBackend() returndevice
update #6958ema
key backward compatibility fix by @glenn-jocher in Modelema
key backward compatibility fix #6972Timeout()
by OS (disable on Windows) by @glenn-jocher in ConditionalTimeout()
by OS (disable on Windows) #7013ComputeLoss()
indexing/speed improvements by @glenn-jocher inComputeLoss()
indexing/speed improvements #7048git clone
instead ofCOPY
by @glenn-jocher in Update Dockerfile togit clone
instead ofCOPY
#7053check_anchor_order()
in pixel-space not grid-space by @glenn-jocher in Fixcheck_anchor_order()
in pixel-space not grid-space #7060y.tensor_split()
by @glenn-jocher in Update detect.py non-inplace withy.tensor_split()
#7062LOGGER.info()
by @glenn-jocher in Update W&B message toLOGGER.info()
#7064da
check_anchor_order()
condition by @glenn-jocher in Add non-zeroda
check_anchor_order()
condition #7066check_anchor_order()
in pixel-space not grid-space by @glenn-jocher in Fix2check_anchor_order()
in pixel-space not grid-space #7067y.tensor_split()
" by @glenn-jocher in Revert "Update detect.py non-inplace withy.tensor_split()
" #7074if self.gr < 1:
by @glenn-jocher in Update loss.py withif self.gr < 1:
#7087tobj
by @glenn-jocher in Update loss for FP16tobj
#7088torch.split()
1.7.0 compatibility fix by @glenn-jocher intorch.split()
1.7.0 compatibility fix #7102pathlib
fix by @glenn-jocher in Model summarypathlib
fix #7104np.fromfile()
Chinese image paths fix by @yeshanliu innp.fromfile()
Chinese image paths fix #6979results.save(labels=False)
option by @glenn-jocher in Add PyTorch Hubresults.save(labels=False)
option #7129cv2.imwrite
on non-ASCII paths by @CCRcmcpe in Fixcv2.imwrite
on non-ASCII paths #7139detect.py --view-img
for non-ASCII paths by @Zengyf-CVer in Fixdetect.py --view-img
for non-ASCII paths #7093os.path.relpath()
Windows bug by @glenn-jocher in Sidestepos.path.relpath()
Windows bug #7158yolo.py --profile
updates by @glenn-jocher inyolo.py --profile
updates #7170C3()
change by @glenn-jocher in RevertC3()
change #7172ENV OMP_NUM_THREADS=8
by @glenn-jocher inENV OMP_NUM_THREADS=8
#7215--name cfg
option by @glenn-jocher in Add train.py--name cfg
option #7202fire
prep updates by @glenn-jocher in CLIfire
prep updates #7229www.youtube.com
hostname by @glenn-jocher in Fixwww.youtube.com
hostname #7242description_file
field by @glenn-jocher in Update setup.cfg todescription_file
field #7248nn.SiLU()
by @glenn-jocher in Export with officialnn.SiLU()
#7256Detect()
for reduced ops by @glenn-jocher in Refactor out-of-placeDetect()
for reduced ops #7257torch.split()
replace slicing on out-of-place inference by @glenn-jocher intorch.split()
replace slicing on out-of-place inference #7258--nms
and--agnostic-nms
by @leeflix in Enable TensorFlow ops for--nms
and--agnostic-nms
#7281cv2.imread()
patch with flags argument by @glenn-jocher in Updatecv2.imread()
patch with flags argument #7287open(file) as f
fixes by @glenn-jocher in Context manageropen(file) as f
fixes #7289--weights
and--data
compatibility check by @glenn-jocher in val.py--weights
and--data
compatibility check #7292check_requirements(('pycocotools>=2.0',))
by @glenn-jocher in Addcheck_requirements(('pycocotools>=2.0',))
#7295tqdm.auto
by @glenn-jocher in Usetqdm.auto
#7311retry=3
todownload()
by @glenn-jocher in Addretry=3
todownload()
#7313if RANK in (-1, 0)
by @glenn-jocher in Print dataset scan onlyif RANK in (-1, 0)
#7337_make_grid()
to modeldtype
by @glenn-jocher in Update_make_grid()
to modeldtype
#7346python benchmarks.py --test
for export-only by @glenn-jocher in Addpython benchmarks.py --test
for export-only #7350stride=32
by @rglkt in DetectMultiBackend() defaultstride=32
#7342unsafe_chunk()
forchunk()
by @glenn-jocher in Swapunsafe_chunk()
forchunk()
#7362opset<=12
check by @glenn-jocher in Remove OpenVINO ONNXopset<=12
check #7398git_describe()
by @glenn-jocher in Updategit_describe()
#7402tensorrt
pip install check by @glenn-jocher in Removetensorrt
pip install check #7439pbar
for DDP ranks > 0 by @glenn-jocher in Disablepbar
for DDP ranks > 0 #7440--half
support for FP16 CoreML exports with by @Cedric-Perauer in Add--half
support for FP16 CoreML exports with #7446Annotator()
plotting by @glenn-jocher in Improved non-latinAnnotator()
plotting #7488check_fonts()
download toCONFIG_DIR
fix by @glenn-jocher incheck_fonts()
download toCONFIG_DIR
fix #7489YOLOv5_AUTOINSTALL
environment variable by @jkocherhans in AddedYOLOv5_AUTOINSTALL
environment variable #7505utils/docker
by @glenn-jocher in Refactor Dockerfiles toutils/docker
#7510plots=plots
by @glenn-jocher in Fix valplots=plots
#7524--file
argument to build by @glenn-jocher in Add Docker--file
argument to build #7527cmds=()
argument by @glenn-jocher in Update check_requirements() withcmds=()
argument #7543--noplots
flag to suppress figures and images logging by @AyushExel in Add--noplots
flag to suppress figures and images logging #7534_verbose=False
fix2 by @glenn-jocher in PyTorch Hub_verbose=False
fix2 #7550results.print()
when_verbose=False
by @glenn-jocher in Enableresults.print()
when_verbose=False
#7558print(results)
override for PyTorch Hub results by @glenn-jocher in Addprint(results)
override for PyTorch Hub results #7559from yolov5 import utils
statement by @Jack24658735 in Fixfrom yolov5 import utils
statement #7578tqdm.auto
by @glenn-jocher in Removetqdm.auto
#7599--half
support for OpenVINO exports by @djmmoss in Add--half
support for OpenVINO exports #7615increment_path()
robustness improvements by @glenn-jocher inincrement_path()
robustness improvements #7628opencv-python>=4.1.1
for Jetson Nano by @glenn-jocher in Reduceopencv-python>=4.1.1
for Jetson Nano #7645scipy>=1.5
to meet numpy constraints by @glenn-jocher in Bumpscipy>=1.5
to meet numpy constraints #7646--dynamic
when--half
is passed by @dmatos2012 in Disallow--dynamic
when--half
is passed #7669FROM ubuntu:20.04
by @glenn-jocher in Pin Docker-cpuFROM ubuntu:20.04
#7677on_train_end
callback by @glenn-jocher in Updateon_train_end
callback #7716static_graph=True
by @glenn-jocher in Implement DDPstatic_graph=True
#6940utils/datasets.py
->utils/dataloaders.py
by @glenn-jocher in Renameutils/datasets.py
->utils/dataloaders.py
#7799@threaded
decorator by @glenn-jocher in Add@threaded
decorator #7813TFDWConv()
module by @glenn-jocher in New TensorFlowTFDWConv()
module #7824TFCrossConv()
module by @glenn-jocher in New TensorFlowTFCrossConv()
module #7827c1 == c2
check by @glenn-jocher in Fix TFDWConv()c1 == c2
check #7842openvino-dev
with OpenVINO Runtime inference by @GabrielDornelles in Replaceopenvino-dev
with OpenVINO Runtime inference #7843depthwise_initializer
fix by @glenn-jocher in TFDWConv()depthwise_initializer
fix #7845--no-install-recommends
by @glenn-jocher in Update Dockerfile--no-install-recommends
#7846libpython3.8-dev
by @glenn-jocher in Update Dockerfile-cpu installlibpython3.8-dev
#7857depth_multiplier
arg by @glenn-jocher in Add TFDWConv()depth_multiplier
arg #7858cv2.resize
interpolation fix by @glenn-jocher incv2.resize
interpolation fix #7903DWConvTranspose2d()
module by @glenn-jocher in AddDWConvTranspose2d()
module #7881check_yaml()
to benchmarks.py by @glenn-jocher in Addcheck_yaml()
to benchmarks.py #7916--keras
argument for TF exports by @glenn-jocher in Add--keras
argument for TF exports #7921check_file()
fix by @glenn-jocher in Windowscheck_file()
fix #7938formats
variable to avoidpd
conflict by @glenn-jocher in Removeformats
variable to avoidpd
conflict #7993check_requirements()
Windows fix by @glenn-jocher incheck_requirements()
Windows fix #7997psutil
andipython
to requirements.txt by @glenn-jocher in Addpsutil
andipython
to requirements.txt #7998--conf > 0.001
by @glenn-jocher in Add warning emoji ⚠️ on--conf > 0.001
#8005protobuf==3.20.1
by @glenn-jocher in Pin CIprotobuf==3.20.1
#8015check_requirements()
"" Windows double quote by @glenn-jocher incheck_requirements()
"" Windows double quote #8016protobuf<=3.20.1
by @glenn-jocher in Add requirements.txtprotobuf<=3.20.1
#8017--save-period
epoch 0 by @glenn-jocher in Simplify and fix--save-period
epoch 0 #8042.detach()
on bias init by @tcmyxc in.detach()
on bias init #8044attempt_load()
deserialize fix by @glenn-jocher inattempt_load()
deserialize fix #8051ultralytics/yolov5
repo by @glenn-jocher in Make Docker actions conditional onultralytics/yolov5
repo #8060long
tofloat
tensor on HUB macOS by @glenn-jocher in Fix torchlong
tofloat
tensor on HUB macOS #8067opencv-python<4.6.0.66
by @glenn-jocher in Docker GPU pip installopencv-python<4.6.0.66
#8164dataset_stats()
YAML checks by @glenn-jocher in Improveddataset_stats()
YAML checks #8125process_batch()
as numpy arrays by @glenn-jocher inprocess_batch()
as numpy arrays #8254logging.ERROR
onRANK
not in (0, 1) by @glenn-jocher inlogging.ERROR
onRANK
not in (0, 1) #8284device_name="MYRIAD" for Intel NCS2
comment by @glenn-jocher indevice_name="MYRIAD" for Intel NCS2
comment #8327--dynamic
export on GPU by @glenn-jocher in Fix ONNX--dynamic
export on GPU #8378--local_rank
arg comment by @pourmand1376 in Improve--local_rank
arg comment #8409--half
fix autocast images to FP16 by @glenn-jocher in TRT--half
fix autocast images to FP16 #8435batch_size
similarly to TensorRT by @democat3457 in Expose OpenVINObatch_size
similarly to TensorRT #8437torch==1.12
on Multi-GPU systems #8395) by @mjun0812 in Exclude torch==1.12.0, torchvision==0.13.0 (Fix #8395) #8497batch_size
similarly to TensorRT" by @glenn-jocher in Revert "Expose OpenVINObatch_size
similarly to TensorRT" #8510--hard-fail
argument to benchmarks for CI errors by @glenn-jocher in Add--hard-fail
argument to benchmarks for CI errors #8513batch_size
from OpenVINO similarly to TensorRT by @democat3457 in Properly exposebatch_size
from OpenVINO similarly to TensorRT #8514--half
arguments to export.py Usage examples by @glenn-jocher in Add--half
arguments to export.py Usage examples #8516--half
fix by @glenn-jocher in XML export--half
fix #8522LoadImages()
with dataset YAML lists by @democat3457 in FixLoadImages()
with dataset YAML lists #8517assert ncm == nc
fix by @glenn-jocher in val.pyassert ncm == nc
fix #8545thop>=0.1.0
by @glenn-jocher in Addthop>=0.1.0
#8558--optimize
not used with cuda device by @democat3457 in Assert--optimize
not used with cuda device #8569weight_decay
value by @developer0hye in Explicitly setweight_decay
value #8592scipy>=1.7.3
by @glenn-jocher in Updatescipy>=1.7.3
#8595tqdm>=4.64.0
andthop>=0.1.1
by @glenn-jocher in Updatetqdm>=4.64.0
andthop>=0.1.1
#8596pip install wheel
to avoid legacysetup.py install
by @glenn-jocher in Addpip install wheel
to avoid legacysetup.py install
#8597OMP_NUM_THREADS=1
for macOS by @glenn-jocher in FixOMP_NUM_THREADS=1
for macOS #8624torch.cuda.manual_seed_all()
for DDP by @glenn-jocher in Settorch.cuda.manual_seed_all()
for DDP #8688else:
from load_image() by @glenn-jocher in Removeelse:
from load_image() #8692HUBDatasetStats()
class by @glenn-jocher in NewHUBDatasetStats()
class #8716is_docker
check by @maxstrobel in fix: brokenis_docker
check #8711detect.py --update
list bug by @glenn-jocher in Fixdetect.py --update
list bug #8783compat _non_persistent_buffers_set
by @glenn-jocher in Deprecate torch 1.6.0compat _non_persistent_buffers_set
#8797Detect.inplace=False
for multithread-safe inference by @glenn-jocher inDetect.inplace=False
for multithread-safe inference #8801val.run(half=amp)
by @glenn-jocher in Update train.py forval.run(half=amp)
#8804ultralytics
ororigin
dynamically by @pourmand1376 in Check git status on upstreamultralytics
ororigin
dynamically #8694assert not is_docker()
from GitHub checks by @glenn-jocher in Removeassert not is_docker()
from GitHub checks #8813torch.nan_to_num(x)
by @glenn-jocher in Remove hooktorch.nan_to_num(x)
#8826/usr/src/app
by @glenn-jocher in RUN git clone instead of COPY to/usr/src/app
#8827smart_resume()
by @glenn-jocher in Newsmart_resume()
#8838--resume
by @glenn-jocher in Self-contained checkpoint--resume
#8839--data coco128.yaml
by @glenn-jocher in Add check_file(data) i.e.--data coco128.yaml
#8851check_file
->check_yaml
by @glenn-jocher in export.py replacecheck_file
->check_yaml
#8852float64
shapes by @glenn-jocher in Update dataloaders.py removefloat64
shapes #8865--resume
training from URL weights by @glenn-jocher in--resume
training from URL weights #8882--resume
training from URL weights fix by @glenn-jocher in--resume
training from URL weights fix #8884smart_optimizer()
improved reporting by @glenn-jocher insmart_optimizer()
improved reporting #8887--search_delegate
fix by @glenn-jocher in Edge TPU add--search_delegate
fix #8902torchvision.utils.draw_bounding_boxes
import by @glenn-jocher in Scopetorchvision.utils.draw_bounding_boxes
import #8915torch==1.7.0
to CI tests by @glenn-jocher in Addtorch==1.7.0
to CI tests #8916--source 'path/*.jpg'
glob example by @glenn-jocher in Fix--source 'path/*.jpg'
glob example #8927destroy_process_group()
on train end by @glenn-jocher in Remove DDPdestroy_process_group()
on train end #8935smart_inference_mode()
conditional decorator by @glenn-jocher in Newsmart_inference_mode()
conditional decorator #8957.tar
support for datasets by @glenn-jocher in Add.tar
support for datasets #8963😃 New Contributors (41)
np.fromfile()
Chinese image paths fix #6979cv2.imwrite
on non-ASCII paths #7139--nms
and--agnostic-nms
#7281stride=32
#7342--half
support for FP16 CoreML exports with #7446YOLOv5_AUTOINSTALL
environment variable #7505from yolov5 import utils
statement #7578--half
support for OpenVINO exports #7615--dynamic
when--half
is passed #7669openvino-dev
with OpenVINO Runtime inference #7843.detach()
on bias init #8044--local_rank
arg comment #8409batch_size
similarly to TensorRT #8437Beta Was this translation helpful? Give feedback.
All reactions