opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
76.54k stars 55.64k forks source link

Convert single layer caffe tests to onnx format #25581

Open WanliZhong opened 1 month ago

WanliZhong commented 1 month ago

Merged with: https://github.com/opencv/opencv_extra/pull/1176 (testdata also should be review) part of https://github.com/opencv/opencv/issues/25314

This PR is used to convert all caffe tests with 'single' layer to onnx format. Tests in test_int8_layer.cpp and test_caffe_importer.cpp will be removed in https://github.com/opencv/opencv/pull/25323

Most layers converted by caffe2onnx Some of them are generated by pytorch and onnxruntime Some of them are wrong after converting, so I use onnx-modifier to correct it.

EXTRA NOTE

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

WanliZhong commented 1 month ago

I removed some layer tests because ONNX doesn't support them. Please leave comments if I should try to keep some of them.