1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Merge pull request #26394 from alexlyulkov:al/new-engine-tf-parser

Modified tensorflow parser for the new dnn engine #26394

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
alexlyulkov
2024-11-27 09:15:20 +03:00
committed by GitHub
parent b9914065e8
commit 3672a14b42
14 changed files with 491 additions and 408 deletions
@@ -69,10 +69,10 @@ public class DnnListRegressionTest extends OpenCVTestCase {
Mat inputBlob = Dnn.blobFromImage(image, 1.0, new Size(224, 224), new Scalar(0), true, true);
assertNotNull("Converting image to blob failed!", inputBlob);
net.setInput(inputBlob, "input");
net.setInput(inputBlob, "");
}
public void testSetInputsNames() {
/*public void testSetInputsNames() {
List<String> inputs = new ArrayList();
inputs.add("input");
try {
@@ -80,12 +80,12 @@ public class DnnListRegressionTest extends OpenCVTestCase {
} catch(Exception e) {
fail("Net setInputsNames failed: " + e.getMessage());
}
}
}*/
public void testForward() {
List<Mat> outs = new ArrayList();
List<String> outNames = new ArrayList();
outNames.add("softmax2");
//outNames.add("");
try {
net.forward(outs,outNames);
} catch(Exception e) {