Skip to content

5.x merge 4.x#1320

Merged
asmorkalov merged 2 commits intoopencv:5.xfrom
asmorkalov:5.x-merge-4.x
Feb 25, 2026
Merged

5.x merge 4.x#1320
asmorkalov merged 2 commits intoopencv:5.xfrom
asmorkalov:5.x-merge-4.x

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

#1308 from Anemptyship:fix/squeeze-all-dims

Previous "Merge 4.x": #1318

Anemptyship and others added 2 commits February 17, 2026 18:28
DNN: Add test for Squeeze with empty axes#1308

## Summary
This PR adds test data for ONNX Squeeze operator when `axes` is not provided. Per ONNX specification, this should remove ALL size-1 dimensions.

## Contents
- `testdata/dnn/onnx/generate_onnx_models.py`: Script updated to generate the model and reference input/output.
- `testdata/dnn/onnx/models/squeeze_no_axes.onnx`: ONNX model with Squeeze op (no axes attribute).
- `testdata/dnn/onnx/data/input_squeeze_no_axes.npy`: Reference input [1, 1, 2, 4] (float32).
- `testdata/dnn/onnx/data/output_squeeze_no_axes.npy`: Reference output [2, 4] (all size-1 dims removed).

## How it was generated
Generated using ONNX Python API with `onnx.helper.make_node('Squeeze', ...)` without axes attribute.
@asmorkalov asmorkalov changed the base branch from 4.x to 5.x February 19, 2026 15:23
@asmorkalov asmorkalov merged commit bc1e8a4 into opencv:5.x Feb 25, 2026
@asmorkalov asmorkalov mentioned this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants