diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c8d8c11e88f1..3e424577b26d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -30,7 +30,7 @@ "background": { "activeOnStart": true, "beginsPattern": "webpack-dev-server", - "endsPattern": "Compiled" + "endsPattern": "compiled" } } } diff --git a/tests/cypress/e2e/issues_prs2/issue_8894_OpenCV_TrackerMIL_tracking_error_with_big_resolution.js b/tests/cypress/e2e/issues_prs2/issue_8894_OpenCV_TrackerMIL_tracking_error_with_big_resolution.js new file mode 100644 index 000000000000..50db9765ee67 --- /dev/null +++ b/tests/cypress/e2e/issues_prs2/issue_8894_OpenCV_TrackerMIL_tracking_error_with_big_resolution.js @@ -0,0 +1,75 @@ +// Copyright (C) 2024 CVAT.ai Corporation +// +// SPDX-License-Identifier: MIT + +/// + +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'); + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index 46516547350c..128204474a3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"