Skip to content

Add test for YOLOX #24593

Closed
Abdurrahheem wants to merge 4 commits into
opencv:4.xfrom
Abdurrahheem:ash/add_yolox_test
Closed

Add test for YOLOX #24593
Abdurrahheem wants to merge 4 commits into
opencv:4.xfrom
Abdurrahheem:ash/add_yolox_test

Conversation

@Abdurrahheem
Copy link
Copy Markdown
Contributor

@Abdurrahheem Abdurrahheem commented Nov 24, 2023

This PR adds test for YOLOX model (which was absent before)
The onnx weights for the test are located in this PR #1126

Pull Request Readiness Checklist

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

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@Abdurrahheem Abdurrahheem marked this pull request as ready for review November 28, 2023 12:50
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you can re-use testYOLO function or at least extract post-processing and reuse it.

Comment thread modules/dnn/test/test_onnx_importer.cpp Outdated
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure and architecture looks good to me. Let;s fix minor remarks.

Comment thread modules/dnn/test/test_onnx_importer.cpp Outdated
std::vector<Rect2d> keep_boxes;
};

FilteredDetections postProcessing(std::vector<Mat> outs, float conf_threshold, float iou_threshold);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::vector<Mat>&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Yolo to the function name.

Comment thread modules/dnn/test/test_onnx_importer.cpp Outdated
float obj_conf = preds.row(i).at<float>(4);
if (obj_conf < conf_threshold)
continue;
continue;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting.

@asmorkalov
Copy link
Copy Markdown
Contributor

Run cd /home/ci/opencv
modules/dnn/test/test_onnx_importer.cpp:2750: trailing whitespace.
+                                 
modules/dnn/test/test_onnx_importer.cpp:2778: trailing whitespace.
+                                
Error: Process completed with exit code 2.

@asmorkalov asmorkalov added this to the 4.9.0 milestone Dec 4, 2023
@asmorkalov
Copy link
Copy Markdown
Contributor

Closed in favor of #24611

@asmorkalov asmorkalov closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants