mirror of https://github.com/WongKinYiu/yolov7.git
Update add_nms.py
parent
a5b853c3fa
commit
aae70703f7
|
@ -1,7 +1,11 @@
|
|||
import numpy as np
|
||||
import onnx
|
||||
from onnx import shape_inference
|
||||
import onnx_graphsurgeon as gs
|
||||
try:
|
||||
import onnx_graphsurgeon as gs
|
||||
except Exception as e:
|
||||
print('Import onnx_graphsurgeon failure: %s' % e)
|
||||
|
||||
import logging
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
@ -148,4 +152,4 @@ class RegisterNMS(object):
|
|||
self.graph.cleanup().toposort()
|
||||
model = gs.export_onnx(self.graph)
|
||||
onnx.save(model, output_path)
|
||||
LOGGER.info(f"Saved ONNX model to {output_path}")
|
||||
LOGGER.info(f"Saved ONNX model to {output_path}")
|
||||
|
|
Loading…
Reference in New Issue