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
-
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 128
with 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 --include
yolov5s.pt
torchscript
yolov5s.torchscript
onnx
yolov5s.onnx
openvino
yolov5s_openvino_model/
engine
yolov5s.engine
coreml
yolov5s.mlmodel
saved_model
yolov5s_saved_model/
pb
yolov5s.pb
tflite
yolov5s.tflite
edgetpu
yolov5s_edgetpu.tflite
tfjs
yolov5s_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).lrf
reduced 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.pt
Example 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.65
Reproduce by
python val.py --data coco.yaml --img 640 --task speed --batch 1
Reproduce by
python val.py --data coco.yaml --img 1536 --iou 0.7 --augment
Changelog
Changes between previous release and this release: v6.0...v6.1
Changes since this release: v6.1...HEAD
New Features and Bug Fixes (271)
tf
conversion in new v6 models by @YoniChechik in fixtf
conversion in new v6 models #5153'onnxruntime-gpu' if torch.has_cuda
by @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_end
callback by @glenn-jocher in Addon_fit_epoch_end
callback #5232EarlyStopping()
message by @glenn-jocher in More informativeEarlyStopping()
message #5303autobatch
feature for bestbatch-size
estimation by @glenn-jocher in Addautobatch
feature for bestbatch-size
estimation #5092AutoShape.forward()
model.classes example by @glenn-jocher in UpdateAutoShape.forward()
model.classes example #5324nl
fix by @glenn-jocher in DDPnl
fix #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 underROOT
working directory by @MrinalJain17 in Updatecheck_git_status()
to run underROOT
working 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',))
#5476LOGGER
by @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_coco
logic betwen train.py and val.py by @glenn-jocher in Commonis_coco
logic 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/*.yaml
files for v6.0n release by @glenn-jocher in Updatemodels/hub/*.yaml
files 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 #5567LOGGER
consolidation by @glenn-jocher inLOGGER
consolidation #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 #5602tqdm
to fixed width by @glenn-jocher in Update train, valtqdm
to fixed width #5367speed
andstudy
tasks by @glenn-jocher in Update val.pyspeed
andstudy
tasks #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=True
for training by @werner-duvaud in Default DataLoadershuffle=True
for training #5623LOGGER
by @glenn-jocher in AutoAnchor and AutoBatchLOGGER
#5635transpose()
with 1permute
in TransformerBlock()` by @dingyiwei in Replace 2transpose()
with 1permute
in TransformerBlock()` #5645NUM_THREADS
leave at least 1 CPU free by @glenn-jocher inNUM_THREADS
leave at least 1 CPU free #5706.autoshape()
method by @glenn-jocher in Remove.autoshape()
method #5694--visualize
by @Zengyf-CVer in Save *.npy features on detect.py--visualize
#5701torch==1.7.0
Path support by @miknyko in TorchScripttorch==1.7.0
Path support #5781DetectMultiBackend()
by @phodgers in Scope TF imports inDetectMultiBackend()
#5792model.warmup()
method by @glenn-jocher in Refactor newmodel.warmup()
method #5810dataset_stats()
tocv2.INTER_AREA
by @glenn-jocher in Updatedataset_stats()
tocv2.INTER_AREA
#5821wandb.errors.UsageError
by @glenn-jocher in Handle non-TTYwandb.errors.UsageError
#5839imgs
inLoadStreams
by @passerbythesun in Avoid inplace modifyingimgs
inLoadStreams
#5850LoadImages
ret_val=False
handling by @gmt710 in UpdateLoadImages
ret_val=False
handling #5852*.torchscript
by @glenn-jocher in Update TorchScript suffix to*.torchscript
#5856--workers 8
argument to val.py by @iumyx2612 in Add--workers 8
argument to val.py #5857plot_lr_scheduler()
by @daikankan in Updateplot_lr_scheduler()
#5864nl
aftercutout()
by @glenn-jocher in Updatenl
aftercutout()
#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=-1
by @youyuxiansen in Makeselect_device()
robust tobatch_size=-1
#5940strip_optimizer()
by @iumyx2612 in Updatestrip_optimizer()
#5949NUM_THREADS
by @glenn-jocher in RefactorNUM_THREADS
#5954tolist()
method by @yonomitt in Fix Detections classtolist()
method #5945imgsz
bug by @d57montes in Fiximgsz
bug #5948pretrained=False
fix by @glenn-jocher inpretrained=False
fix #5966__init__()
by @glenn-jocher in Update callbacks.py with__init__()
#5979ar_thr
from 20 to 100 for better detection on slender (high aspect ratio) objects by @MrinalJain17 in Increasear_thr
from 20 to 100 for better detection on slender (high aspect ratio) objects #5556--weights URL
by @glenn-jocher in Allow--weights URL
#5991jar xf file.zip
for zips by @glenn-jocher in Recommendjar xf file.zip
for zips #5993self.jit
fix by @glenn-jocher in *.torchscript inferenceself.jit
fix #6007--freeze
argument by @youyuxiansen in Multi-layer capable--freeze
argument #6019LOGGER
fix by @glenn-jocher in KaggleLOGGER
fix #6041set_logging()
indexing by @glenn-jocher in Simplifyset_logging()
indexing #6042--freeze
fix by @glenn-jocher in--freeze
fix #6044if: else
statements by @cmoseses in Refactor/reduce G/C/D/IoUif: else
statements #6087max_wh=7680
for 8k images by @glenn-jocher in Update NMSmax_wh=7680
for 8k images #6178*_openvino_model/
dir by @glenn-jocher in Ignore*_openvino_model/
dir #6180anchor_grid
compatibility fix by @imyhxy in TensorRT 7anchor_grid
compatibility fix #6185tensorrt>=7.0.0
checks by @glenn-jocher in Addtensorrt>=7.0.0
checks #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_compiler
checks by @glenn-jocher in Addedgetpu_compiler
checks #6218edgetpu-compiler
autoinstall by @glenn-jocher in Attemptedgetpu-compiler
autoinstall #6223models/hub
variants by @glenn-jocher in Update P2-P7models/hub
variants #6230cmd
string ontfjs
export by @dart-bird in Fixcmd
string ontfjs
export #6243--half
FP16 inference by @glenn-jocher in Enable ONNX--half
FP16 inference #6268is_kaggle()
function by @glenn-jocher in Addis_kaggle()
function #6285device
count check by @glenn-jocher in Fixdevice
count check #6290select_device()
cleanup by @glenn-jocher inselect_device()
cleanup #6302train.py
parameter groups desc error by @Otfot in Fixtrain.py
parameter 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.py
return exported files/dirs by @glenn-jocher inexport.py
return exported files/dirs #6343export.py
automaticforward_export
by @glenn-jocher inexport.py
automaticforward_export
#6352VERBOSE
environment variable by @johnk2hawaii in Add optionalVERBOSE
environment variable #6353de_parallel()
rather thanis_parallel()
by @imyhxy in Reusede_parallel()
rather thanis_parallel()
#6354DEVICE_COUNT
instead ofWORLD_SIZE
to calculatenw
by @sitecao inDEVICE_COUNT
instead ofWORLD_SIZE
to calculatenw
#6324--evolve
by @AyushExel in Flush callbacks when on--evolve
#6374albumentations
to Dockerfile by @glenn-jocher in Addalbumentations
to Dockerfile #6392stop_training=False
flag to callbacks by @haimat in Addstop_training=False
flag to callbacks #6365detect.py
GIF video inference by @glenn-jocher in Adddetect.py
GIF video inference #6410greetings.yaml
email address by @glenn-jocher in Updategreetings.yaml
email address #6412tflite_runtime
for TFLite inference if installed by @motokimura in Prefertflite_runtime
for TFLite inference if installed #6406VERBOSE
env variable toYOLOv5_VERBOSE
by @glenn-jocher in NamespaceVERBOSE
env variable toYOLOv5_VERBOSE
#6428*.asf
video support by @toschi23 in Add*.asf
video 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.py
usage examples by @glenn-jocher in Improvedexport.py
usage examples #6495list()
->sorted()
by @glenn-jocher in CoreML inference fixlist()
->sorted()
#6496torch.jit.TracerWarning
on export by @glenn-jocher in Suppresstorch.jit.TracerWarning
on export #6498export.run()
TracerWarning
by @glenn-jocher in Suppressexport.run()
TracerWarning
#6499batch_size
on resuming by @AyushExel in W&B: Rememberbatch_size
on resuming #6512lrf: 0.1
by @glenn-jocher in Update hyp.scratch-high.yamllrf: 0.1
#6525sudo
fix by @glenn-jocher in Edge TPU compilersudo
fix #6531tf.lite.experimental.load_delegate
fix by @glenn-jocher in Edge TPUtf.lite.experimental.load_delegate
fix #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--evolve
project names by @MattVAD in Allow custom--evolve
project names #6567DATASETS_DIR
global in general.py by @glenn-jocher in AddDATASETS_DIR
global in general.py #6578opt
fromtrain.run()
by @chf4850 in returnopt
fromtrain.run()
#6581pafy
package by @glenn-jocher in Fix YouTube dislike button bug inpafy
package #6603hyp_evolve.yaml
indexing bug by @glenn-jocher in Fixhyp_evolve.yaml
indexing bug #6604ROOT / data
when running W&Blog_dataset()
by @or-toledano in FixROOT / data
when running W&Blog_dataset()
#6606youtube_dl==2020.12.2
by @glenn-jocher in YouTube dependency fixyoutube_dl==2020.12.2
#6612vmin=0.0
by @glenn-jocher in Fix ConfusionMatrix scalevmin=0.0
#6638KeyError
by @imyhxy in Fixed wandb loggerKeyError
#6637--workers
by @glenn-jocher in Validate with 2x--workers
#6658--workers
single-GPU/CPU fix by @glenn-jocher in Validate with 2x--workers
single-GPU/CPU fix #6659--cache val
option by @glenn-jocher in Add--cache val
option #6663scipy.cluster.vq.kmeans
too few points by @glenn-jocher in Robustscipy.cluster.vq.kmeans
too few points #6668torch==1.10.2+cu113
by @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 #6705torch
AMP-CPU warnings by @glenn-jocher in Suppresstorch
AMP-CPU warnings #6706nw
tomax(nd, 1)
by @glenn-jocher in Updatenw
tomax(nd, 1)
#6714New Contributors (48)
tf
conversion in new v6 models #5153check_git_status()
to run underROOT
working directory #5441check_requirements()
resource warning allocation open file #5602shuffle=True
for training #5623--visualize
#5701DetectMultiBackend()
#5792imgs
inLoadStreams
#5850LoadImages
ret_val=False
handling #5852--workers 8
argument to val.py #5857plot_lr_scheduler()
#5864Detections().tolist()
explicit argument fix #5907select_device()
robust tobatch_size=-1
#5940tolist()
method #5945if: else
statements #6087cmd
string ontfjs
export #6243train.py
parameter groups desc error #6318VERBOSE
environment variable #6353DEVICE_COUNT
instead ofWORLD_SIZE
to calculatenw
#6324stop_training=False
flag to callbacks #6365tflite_runtime
for TFLite inference if installed #6406*.asf
video support #6436--evolve
project names #6567opt
fromtrain.run()
#6581ROOT / data
when 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