v6.1 - TensorRT, TensorFlow Edge TPU and OpenVINO Export and Inference #6740
glenn-jocher
started this conversation in
General
Replies: 3 comments 5 replies
-
|
The tensorflow savedmodel link is not working for me. When I click on it, it just downloads the website instead of actually showing it. All other links there works. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Will you post the pretrained weights for YOLOv5s-P2? |
Beta Was this translation helpful? Give feedback.
2 replies
-
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


Uh oh!
There was an error while loading. Please reload this page.
-
This release incorporates new features and bug fixes (271 PRs from 48 contributors) since our last release in October 2021. It adds TensorRT, Edge TPU and OpenVINO support, and provides retrained models at
--batch-size 128with new default one-cycle linear LR scheduler. YOLOv5 now officially supports 11 different formats, not just for export but for inference (both detect.py and PyTorch Hub), and validation to profile mAP and speed results after export.export.py --includeyolov5s.pttorchscriptyolov5s.torchscriptonnxyolov5s.onnxopenvinoyolov5s_openvino_model/engineyolov5s.enginecoremlyolov5s.mlmodelsaved_modelyolov5s_saved_model/pbyolov5s.pbtfliteyolov5s.tfliteedgetpuyolov5s_edgetpu.tflitetfjsyolov5s_web_model/Usage examples (ONNX shown):
Important Updates
python export.py --include saved_model pb tflite tfjs(Export, detect and validation with TensorRT engine file #5699 by @imyhxy)python utils/benchmarks.py --weights yolov5s.pt. Currently operates on CPU, future updates will implement GPU support. (YOLOv5 CPU Export Benchmarks #6613 by @glenn-jocher).lrfreduced from 0.2 to 0.1 (Update hyp.scratch-high.yamllrf: 0.1#6525 by @glenn-jocher).New Results
All model trainings logged to https://wandb.ai/glenn-jocher/YOLOv5_v61_official
YOLOv5-P5 640 Figure (click to expand)
Figure Notes (click to expand)
python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.ptExample YOLOv5l before and after metrics:
Large
(pixels)
0.5:0.95
0.5
CPU b1
(ms)
V100 b1
(ms)
V100 b32
(ms)
(M)
@640 (B)
Pretrained Checkpoints
(pixels)
0.5:0.95
0.5
CPU b1
(ms)
V100 b1
(ms)
V100 b32
(ms)
(M)
@640 (B)
+ TTA
1536
55.8
72.7
-
-
-
-
-
Table Notes (click to expand)
Reproduce by
python val.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65Reproduce by
python val.py --data coco.yaml --img 640 --task speed --batch 1Reproduce by
python val.py --data coco.yaml --img 1536 --iou 0.7 --augmentChangelog
Changes between previous release and this release: v6.0...v6.1
Changes since this release: v6.1...HEAD
New Features and Bug Fixes (271)
tfconversion in new v6 models by @YoniChechik in fixtfconversion in new v6 models #5153'onnxruntime-gpu' if torch.has_cudaby @glenn-jocher in Check'onnxruntime-gpu' if torch.has_cuda#5087LoadImagesAndLabels()dataloader by @glenn-jocher in Add class filtering toLoadImagesAndLabels()dataloader #5172''and""by @glenn-jocher in Improved check_suffix() robustness to''and""#5192on_fit_epoch_endcallback by @glenn-jocher in Addon_fit_epoch_endcallback #5232EarlyStopping()message by @glenn-jocher in More informativeEarlyStopping()message #5303autobatchfeature for bestbatch-sizeestimation by @glenn-jocher in Addautobatchfeature for bestbatch-sizeestimation #5092AutoShape.forward()model.classes example by @glenn-jocher in UpdateAutoShape.forward()model.classes example #5324nlfix by @glenn-jocher in DDPnlfix #5332MixConv2d()remove shortcut + apply depthwise by @glenn-jocher in FixMixConv2d()remove shortcut + apply depthwise #5410indexing='ij'for PyTorch 1.10 by @glenn-jocher in Meshgridindexing='ij'for PyTorch 1.10 #5309get_loggers()by @glenn-jocher in Updateget_loggers()#4854check_git_status()to run underROOTworking directory by @MrinalJain17 in Updatecheck_git_status()to run underROOTworking directory #5441LoadImages()dataloader return values by @glenn-jocher in Fix tf.pyLoadImages()dataloader return values #5455check_requirements(('tensorflow>=2.4.1',))by @glenn-jocher in Removecheck_requirements(('tensorflow>=2.4.1',))#5476LOGGERby @glenn-jocher in Update torch_utils.py importLOGGER#5483increment_path()with multiple-suffix filenames by @glenn-jocher in Fixincrement_path()with multiple-suffix filenames #5518is_cocologic betwen train.py and val.py by @glenn-jocher in Commonis_cocologic betwen train.py and val.py #5521increment_path()explicit file vs dir handling by @glenn-jocher in Fixincrement_path()explicit file vs dir handling #5523check_file()avoid repeat URL downloads by @glenn-jocher in Updatecheck_file()avoid repeat URL downloads #5526models/hub/*.yamlfiles for v6.0n release by @glenn-jocher in Updatemodels/hub/*.yamlfiles for v6.0n release #5540intersect_dicts()in hubconf.py fix by @glenn-jocher inintersect_dicts()in hubconf.py fix #5542save_one_box()by @glenn-jocher in Fixsave_one_box()#5545--conf-thres>> 0.001 warning by @glenn-jocher in Add--conf-thres>> 0.001 warning #5567LOGGERconsolidation by @glenn-jocher inLOGGERconsolidation #5569DetectMultiBackend()class by @glenn-jocher in NewDetectMultiBackend()class #5549notebook_init()to utils/init.py by @glenn-jocher in Addnotebook_init()to utils/__init__.py #5488check_requirements()resource warning allocation open file by @ayman-saleh in Fixcheck_requirements()resource warning allocation open file #5602tqdmto fixed width by @glenn-jocher in Update train, valtqdmto fixed width #5367speedandstudytasks by @glenn-jocher in Update val.pyspeedandstudytasks #5608np.unique()sort fix for segments by @glenn-jocher innp.unique()sort fix for segments #5609WORLD_SIZE-safe dataloader workers by @glenn-jocher in DDPWORLD_SIZE-safe dataloader workers #5631shuffle=Truefor training by @werner-duvaud in Default DataLoadershuffle=Truefor training #5623LOGGERby @glenn-jocher in AutoAnchor and AutoBatchLOGGER#5635transpose()with 1permutein TransformerBlock()` by @dingyiwei in Replace 2transpose()with 1permutein TransformerBlock()` #5645NUM_THREADSleave at least 1 CPU free by @glenn-jocher inNUM_THREADSleave at least 1 CPU free #5706.autoshape()method by @glenn-jocher in Remove.autoshape()method #5694--visualizeby @Zengyf-CVer in Save *.npy features on detect.py--visualize#5701torch==1.7.0Path support by @miknyko in TorchScripttorch==1.7.0Path support #5781DetectMultiBackend()by @phodgers in Scope TF imports inDetectMultiBackend()#5792model.warmup()method by @glenn-jocher in Refactor newmodel.warmup()method #5810dataset_stats()tocv2.INTER_AREAby @glenn-jocher in Updatedataset_stats()tocv2.INTER_AREA#5821wandb.errors.UsageErrorby @glenn-jocher in Handle non-TTYwandb.errors.UsageError#5839imgsinLoadStreamsby @passerbythesun in Avoid inplace modifyingimgsinLoadStreams#5850LoadImagesret_val=Falsehandling by @gmt710 in UpdateLoadImagesret_val=Falsehandling #5852*.torchscriptby @glenn-jocher in Update TorchScript suffix to*.torchscript#5856--workers 8argument to val.py by @iumyx2612 in Add--workers 8argument to val.py #5857plot_lr_scheduler()by @daikankan in Updateplot_lr_scheduler()#5864nlaftercutout()by @glenn-jocher in Updatenlaftercutout()#5873AutoShape()models asDetectMultiBackend()instances by @glenn-jocher inAutoShape()models asDetectMultiBackend()instances #5845Detections().tolist()explicit argument fix by @lizeng614 inDetections().tolist()explicit argument fix #5907notebook_init()by @glenn-jocher in Add hardware checks tonotebook_init()#5919plot_lr_scheduler()" by @glenn-jocher in Revert "Updateplot_lr_scheduler()" #5920autocast(False)by @glenn-jocher in Default PyTorch Hub toautocast(False)#5926select_device()robust tobatch_size=-1by @youyuxiansen in Makeselect_device()robust tobatch_size=-1#5940strip_optimizer()by @iumyx2612 in Updatestrip_optimizer()#5949NUM_THREADSby @glenn-jocher in RefactorNUM_THREADS#5954tolist()method by @yonomitt in Fix Detections classtolist()method #5945imgszbug by @d57montes in Fiximgszbug #5948pretrained=Falsefix by @glenn-jocher inpretrained=Falsefix #5966__init__()by @glenn-jocher in Update callbacks.py with__init__()#5979ar_thrfrom 20 to 100 for better detection on slender (high aspect ratio) objects by @MrinalJain17 in Increasear_thrfrom 20 to 100 for better detection on slender (high aspect ratio) objects #5556--weights URLby @glenn-jocher in Allow--weights URL#5991jar xf file.zipfor zips by @glenn-jocher in Recommendjar xf file.zipfor zips #5993self.jitfix by @glenn-jocher in *.torchscript inferenceself.jitfix #6007--freezeargument by @youyuxiansen in Multi-layer capable--freezeargument #6019LOGGERfix by @glenn-jocher in KaggleLOGGERfix #6041set_logging()indexing by @glenn-jocher in Simplifyset_logging()indexing #6042--freezefix by @glenn-jocher in--freezefix #6044if: elsestatements by @cmoseses in Refactor/reduce G/C/D/IoUif: elsestatements #6087max_wh=7680for 8k images by @glenn-jocher in Update NMSmax_wh=7680for 8k images #6178*_openvino_model/dir by @glenn-jocher in Ignore*_openvino_model/dir #6180anchor_gridcompatibility fix by @imyhxy in TensorRT 7anchor_gridcompatibility fix #6185tensorrt>=7.0.0checks by @glenn-jocher in Addtensorrt>=7.0.0checks #6193nan-robust stream FPS by @glenn-jocher in Fixnan-robust stream FPS #6198--int8'flatbuffers==1.12' fix by @glenn-jocher in TFLite--int8'flatbuffers==1.12' fix #6216--int8'flatbuffers==1.12' fix 2 by @glenn-jocher in TFLite--int8'flatbuffers==1.12' fix 2 #6217edgetpu_compilerchecks by @glenn-jocher in Addedgetpu_compilerchecks #6218edgetpu-compilerautoinstall by @glenn-jocher in Attemptedgetpu-compilerautoinstall #6223models/hubvariants by @glenn-jocher in Update P2-P7models/hubvariants #6230cmdstring ontfjsexport by @dart-bird in Fixcmdstring ontfjsexport #6243--halfFP16 inference by @glenn-jocher in Enable ONNX--halfFP16 inference #6268is_kaggle()function by @glenn-jocher in Addis_kaggle()function #6285devicecount check by @glenn-jocher in Fixdevicecount check #6290select_device()cleanup by @glenn-jocher inselect_device()cleanup #6302train.pyparameter groups desc error by @Otfot in Fixtrain.pyparameter groups desc error #6318dataset_stats()autodownload capability by @glenn-jocher in Removedataset_stats()autodownload capability #6303assert im.device.type != 'cpu'on export by @glenn-jocher in TensorRTassert im.device.type != 'cpu'on export #6340export.pyreturn exported files/dirs by @glenn-jocher inexport.pyreturn exported files/dirs #6343export.pyautomaticforward_exportby @glenn-jocher inexport.pyautomaticforward_export#6352VERBOSEenvironment variable by @johnk2hawaii in Add optionalVERBOSEenvironment variable #6353de_parallel()rather thanis_parallel()by @imyhxy in Reusede_parallel()rather thanis_parallel()#6354DEVICE_COUNTinstead ofWORLD_SIZEto calculatenwby @sitecao inDEVICE_COUNTinstead ofWORLD_SIZEto calculatenw#6324--evolveby @AyushExel in Flush callbacks when on--evolve#6374albumentationsto Dockerfile by @glenn-jocher in Addalbumentationsto Dockerfile #6392stop_training=Falseflag to callbacks by @haimat in Addstop_training=Falseflag to callbacks #6365detect.pyGIF video inference by @glenn-jocher in Adddetect.pyGIF video inference #6410greetings.yamlemail address by @glenn-jocher in Updategreetings.yamlemail address #6412tflite_runtimefor TFLite inference if installed by @motokimura in Prefertflite_runtimefor TFLite inference if installed #6406VERBOSEenv variable toYOLOv5_VERBOSEby @glenn-jocher in NamespaceVERBOSEenv variable toYOLOv5_VERBOSE#6428*.asfvideo support by @toschi23 in Add*.asfvideo support #6436dataset_stats()autodownload capability" by @glenn-jocher in Revert "Removedataset_stats()autodownload capability" #6442select_device()for Multi-GPU by @glenn-jocher in Fixselect_device()for Multi-GPU #6434select_device()for Multi-GPU by @glenn-jocher in Fix2select_device()for Multi-GPU #6461export.pyusage examples by @glenn-jocher in Improvedexport.pyusage examples #6495list()->sorted()by @glenn-jocher in CoreML inference fixlist()->sorted()#6496torch.jit.TracerWarningon export by @glenn-jocher in Suppresstorch.jit.TracerWarningon export #6498export.run()TracerWarningby @glenn-jocher in Suppressexport.run()TracerWarning#6499batch_sizeon resuming by @AyushExel in W&B: Rememberbatch_sizeon resuming #6512lrf: 0.1by @glenn-jocher in Update hyp.scratch-high.yamllrf: 0.1#6525sudofix by @glenn-jocher in Edge TPU compilersudofix #6531tf.lite.experimental.load_delegatefix by @glenn-jocher in Edge TPUtf.lite.experimental.load_delegatefix #6536if any(f):by @glenn-jocher in Fix zero-export handling withif any(f):#6569plot_labels()colored histogram bug by @glenn-jocher in Fixplot_labels()colored histogram bug #6574--evolveproject names by @MattVAD in Allow custom--evolveproject names #6567DATASETS_DIRglobal in general.py by @glenn-jocher in AddDATASETS_DIRglobal in general.py #6578optfromtrain.run()by @chf4850 in returnoptfromtrain.run()#6581pafypackage by @glenn-jocher in Fix YouTube dislike button bug inpafypackage #6603hyp_evolve.yamlindexing bug by @glenn-jocher in Fixhyp_evolve.yamlindexing bug #6604ROOT / datawhen running W&Blog_dataset()by @or-toledano in FixROOT / datawhen running W&Blog_dataset()#6606youtube_dl==2020.12.2by @glenn-jocher in YouTube dependency fixyoutube_dl==2020.12.2#6612vmin=0.0by @glenn-jocher in Fix ConfusionMatrix scalevmin=0.0#6638KeyErrorby @imyhxy in Fixed wandb loggerKeyError#6637--workersby @glenn-jocher in Validate with 2x--workers#6658--workerssingle-GPU/CPU fix by @glenn-jocher in Validate with 2x--workerssingle-GPU/CPU fix #6659--cache valoption by @glenn-jocher in Add--cache valoption #6663scipy.cluster.vq.kmeanstoo few points by @glenn-jocher in Robustscipy.cluster.vq.kmeanstoo few points #6668torch==1.10.2+cu113by @glenn-jocher in Update Dockerfiletorch==1.10.2+cu113#6669--evolve --bucket gs://...by @glenn-jocher in Fix--evolve --bucket gs://...#6698export_formats()in export.py by @glenn-jocher in Useexport_formats()in export.py #6705torchAMP-CPU warnings by @glenn-jocher in SuppresstorchAMP-CPU warnings #6706nwtomax(nd, 1)by @glenn-jocher in Updatenwtomax(nd, 1)#6714New Contributors (48)
tfconversion in new v6 models #5153check_git_status()to run underROOTworking directory #5441check_requirements()resource warning allocation open file #5602shuffle=Truefor training #5623--visualize#5701DetectMultiBackend()#5792imgsinLoadStreams#5850LoadImagesret_val=Falsehandling #5852--workers 8argument to val.py #5857plot_lr_scheduler()#5864Detections().tolist()explicit argument fix #5907select_device()robust tobatch_size=-1#5940tolist()method #5945if: elsestatements #6087cmdstring ontfjsexport #6243train.pyparameter groups desc error #6318VERBOSEenvironment variable #6353DEVICE_COUNTinstead ofWORLD_SIZEto calculatenw#6324stop_training=Falseflag to callbacks #6365tflite_runtimefor TFLite inference if installed #6406*.asfvideo support #6436--evolveproject names #6567optfromtrain.run()#6581ROOT / datawhen running W&Blog_dataset()#6606Full Changelog: v6.0...v6.1
This discussion was created from the release v6.1 - TensorRT, TensorFlow Edge TPU and OpenVINO Export and Inference.
Beta Was this translation helpful? Give feedback.
All reactions