NonMaxSuppression not implemented yet
Tsao666 opened this issue · comments
Hi,
I'm trying to convert YoloV7-tiny.onnx to keras by using cli command below
python converter.py --weights "yolov7-tiny.onnx" --formats "keras"
but raise exception:
Traceback (most recent call last):
File "converter.py", line 73, in <module>
run()
File "converter.py", line 57, in run
onnx_converter(
File "converter.py", line 19, in onnx_converter
keras_model = keras_builder(model_proto, input_node_names, output_node_names, native_groupconv)
File "/outerDisk1/onnx2tflite/utils/builder.py", line 101, in keras_builder
raise KeyError(f"{op_name} not implemented yet")
KeyError: 'NonMaxSuppression not implemented yet'
anyone know how to fix it?
NonMaxSuppression is a dynamic operator, and maybe not suitable for tflite.
You should not add "--include-nms" in export yolov7 onnx, remove it and try again.
I export onnx by this command:
python export.py --weights weights/yolov7-tiny.pt --grid --end2end --simplify --topk-all 100 --iou-thres 0.65 --conf-thres 0.35 --img-size 320 320 --max-wh 320
but still not work. any suggestion?
I'm run this command, and successed.
python export.py --weights ./yolov7-tiny.pt --grid --simplify
My yolov7 version is latest, maybe you should check cafefully.
The convert command:
python converter.py --weights "./models/yolov7-tiny.onnx" --formats "keras"
I found that NMS operator would added when parameter --end2end
was set, remove it will be ok, thanks!