Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing OpenCV TrackerMIL 'Tracking error' on high resolution #8934

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"background": {
"activeOnStart": true,
"beginsPattern": "webpack-dev-server",
"endsPattern": "Compiled"
"endsPattern": "compiled"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright (C) 2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

/// <reference types="cypress" />

import { taskName } from '../../support/const';

context.skip('OpenCV - TrackerMIL - Tracking error with big resolution', () => {
const issueId = '8894';
const labelName = `${issueId}`;
const attrName = `Attr for ${labelName}`;
const imageFileName = `image_${labelName.replace(' ', '_').toLowerCase()}`;
const width = 5000;
const height = 5000;
const posX = 10;
const posY = 10;
const color = 'gray';
const imagesFolder = `cypress/fixtures/${imageFileName}`;
const archiveName = `${imageFileName}.zip`;
const archivePath = `cypress/fixtures/${archiveName}`;
const directoryToArchive = imagesFolder;
const extension = 'jpg';
const textDefaultValue = 'Some default value for type Text';
const spacing = 5;
const imagesCount = 3;

const createOpencvTrackerShape = {
labelName,
tracker: 'TrackerMIL',
pointsMap: [
{ x: 430, y: 40 },
{ x: 640, y: 145 },
],
};

function loadOpenCV() {
cy.interactOpenCVControlButton();
cy.get('.cvat-opencv-control-popover').within(() => {
cy.contains('OpenCV is loading').should('not.exist');
});
cy.get('body').click();
}

before(() => {
for (let i = 0; i < imagesCount; i++) {
cy.imageGenerator(imagesFolder, imageFileName + i, width, height, color, posX + i * spacing,
posY + i * spacing, labelName, 1, extension);
}
cy.createZipArchive(directoryToArchive, archivePath);
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName);

cy.openTaskJob(taskName);
});
describe(`Testing issue ${issueId}`, () => {
// TODO: activate it after the fix
it.skip('Create a shape with "TrackerMIL" on a big picture. Look out for a tracking error', () => {
const shapeNumber = 1;
loadOpenCV();
// We will start testing tracking from 2nd frame because it's a bit unstable on inintialization
cy.goToNextFrame(1);
cy.createOpenCVTrack(createOpencvTrackerShape);
cy.get('.cvat-tracking-notice').should('not.exist');
cy.get(`#cvat_canvas_shape_${shapeNumber}`)
.then(() => {
cy.get('.cvat-tracking-notice').should('not.exist');
cy.get(`#cvat-objects-sidebar-state-item-${shapeNumber}`)
.should('contain', 'RECTANGLE TRACK');
// We don't actually check tracking functionality, we just doing load testing
});
cy.goToNextFrame(2);
cy.get('.ant-notification-notice-message').contains('Tracking error').should('not.exist');
});
});
});
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3706,9 +3706,9 @@ camera-controls@^1.25.3:
integrity sha512-EfzbovxLssyWpJVG9uKcazSDDIEcd1hUsPhPF/OWWnICsKY9WbLY/2S4UPW73HHbvnVeR/Z9wsWaQKtANy/2Yg==

caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
version "1.0.30001617"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz#809bc25f3f5027ceb33142a7d6c40759d7a901eb"
integrity sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==
version "1.0.30001690"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz"
integrity sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==

canvas@^2.8.0:
version "2.11.2"
Expand Down
Loading