File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 16
16
TensorFlow Edge TPU | `edgetpu` | yolov5s_edgetpu.tflite
17
17
TensorFlow.js | `tfjs` | yolov5s_web_model/
18
18
19
+ Requirements:
20
+ $ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu # CPU
21
+ $ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime-gpu openvino-dev tensorflow # GPU
22
+
19
23
Usage:
20
24
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx openvino engine coreml tflite ...
21
25
@@ -437,6 +441,7 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path'
437
441
438
442
# Exports
439
443
f = ['' ] * 10 # exported filenames
444
+ warnings .filterwarnings (action = 'ignore' , category = torch .jit .TracerWarning ) # suppress TracerWarning
440
445
if 'torchscript' in include :
441
446
f [0 ] = export_torchscript (model , im , file , optimize )
442
447
if 'engine' in include : # TensorRT required before ONNX
@@ -509,10 +514,8 @@ def parse_opt():
509
514
510
515
511
516
def main (opt ):
512
- with warnings .catch_warnings ():
513
- warnings .filterwarnings (action = 'ignore' , category = torch .jit .TracerWarning ) # suppress TracerWarning
514
- for opt .weights in (opt .weights if isinstance (opt .weights , list ) else [opt .weights ]):
515
- run (** vars (opt ))
517
+ for opt .weights in (opt .weights if isinstance (opt .weights , list ) else [opt .weights ]):
518
+ run (** vars (opt ))
516
519
517
520
518
521
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments