Skip to content

Commit 35fc948

Browse files
author
Oleg Valiulin
committed
wip: delta on tracking with highres
1 parent 38af059 commit 35fc948

File tree

2 files changed

+7
-43
lines changed

2 files changed

+7
-43
lines changed

.vscode/launch.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@
153153
"--headless",
154154
"--browser",
155155
"chrome",
156-
"--spec",
157-
"cypress/e2e/actions_tasks2/case_101*.js"
158156
],
159157
"outputCapture": "std",
160158
"console": "internalConsole"

tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
6060
const scaleFrom400 = 12.5;
6161
const width = 400 * scaleFrom400; // =5000
6262
const height = 400 * scaleFrom400;
63-
const delta = 3; // ???
63+
const delta = 3; // ??? probably requires bigger delta or something else
6464
const maxTextWidth = undefined;
6565
const textHeightPx = 77 * scaleFrom400;
6666
const posX = 10 * scaleFrom400;
67-
const posY = 10 * scaleFrom400; // TODO: determine scale of picture
67+
const posY = 10 * scaleFrom400;
6868
const archiveName = `${imageFileName}.zip`;
6969
const archivePath = `cypress/fixtures/${archiveName}`;
7070
const imagesFolder = `cypress/fixtures/${imageFileName}`;
@@ -81,17 +81,12 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
8181
// cy.task('log', `x:${posX + i * 5}, y:${posY + i * 5}`);
8282
// cy.imageGenerator(imagesFolder, imageFileName + i, width, height, color, posX + i * 5,
8383
// posY + i * 5, labelName, 1, extension);
84-
// TODO: compare times, makeCustomImage might take to long (from 00:58 to 1:30)
8584
cy.makeCustomImage(imagesFolder, `${imageFileName}_${i}`,
8685
width, height,
8786
fontSize, color, textColor,
8887
posX + i * 5 * scaleFrom400, posY + i * 5 * scaleFrom400,
8988
`${labelName}. Num ${i}`, extension,
9089
maxTextWidth);
91-
/* TODO:
92-
1. recreate scale and position of the text as it was previously with jimp but now with canvas
93-
- side quest: draw from ofscreencanvas
94-
*/
9590
}
9691
cy.createZipArchive(directoryToArchive, archivePath);
9792
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName);
@@ -116,7 +111,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
116111
cy.opencvCreateShape(createOpencvShapeSecondLabel);
117112
});
118113

119-
it.skip('Change the number of points when the shape is drawn. Cancel drawing.', () => {
114+
it('Change the number of points when the shape is drawn. Cancel drawing.', () => {
120115
cy.interactOpenCVControlButton();
121116
cy.get('.cvat-opencv-drawing-tool').click();
122117
pointsMap.forEach((element) => {
@@ -132,7 +127,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
132127
.find('[role="slider"]')
133128
.type(generateString(4, 'rightarrow'));
134129
cy.get('.cvat_canvas_interact_intermediate_shape').then((_intermediateShape) => {
135-
// Get count of points againe
130+
// Get count of points again
136131
const intermediateShapeNumberPointsAfterChange = _intermediateShape.attr('points').split(' ').length;
137132
// expected 7 to be below 10
138133
expect(intermediateShapeNumberPointsBeforeChange).to.be.lt(
@@ -166,7 +161,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
166161
cy.get('.cvat_canvas_shape').should('have.length', 2);
167162
});
168163

169-
it.skip('Check "Intelligent scissors blocking feature". Cancel drawing.', () => {
164+
it('Check "Intelligent scissors blocking feature". Cancel drawing.', () => {
170165
cy.interactOpenCVControlButton();
171166
cy.get('.cvat-opencv-drawing-tool').click();
172167
cy.get('.cvat-annotation-header-block-tool-button').click();
@@ -194,7 +189,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
194189
cy.get('body').type('{Esc}');
195190
});
196191

197-
it.skip('Check "Histogram Equalization" feature.', () => {
192+
it('Check "Histogram Equalization" feature.', () => {
198193
cy.checkPopoverHidden('opencv-control');
199194
cy.interactOpenCVControlButton();
200195
cy.get('.cvat-opencv-control-popover').contains('[role="tab"]', 'Image').click();
@@ -246,7 +241,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
246241
// });
247242
// cy.get('#cvat_canvas_shape_4').invoke('attr', 'y').then((yVal) => {
248243
// expect(parseFloat(yVal)).to.be.closeTo(y + i * 5 * scaleFrom400, delta);
249-
// }); // TODO: refactor to $shape
244+
// });
250245
cy.get('#cvat_canvas_shape_4').then(($shape) => {
251246
cy.task('log', `x:${+$shape.attr('x')}, y:${+$shape.attr('x')}`);
252247
expect(+$shape.attr('x')).to.be.closeTo(x + i * 5 * scaleFrom400, delta);
@@ -260,34 +255,5 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
260255
}
261256
});
262257
});
263-
// after(() => assert(0));
264-
});
265-
function loadOpenCV() {
266-
cy.interactOpenCVControlButton();
267-
cy.get('.cvat-opencv-control-popover').within(() => {
268-
cy.contains('OpenCV is loading').should('not.exist');
269-
});
270-
cy.get('body').click();
271-
}
272-
273-
describe.skip('Testing issue 8894', () => {
274-
// TODO: activate it after the fix
275-
it('Create a shape with "TrackerMIL" on a big picture. Look out for a tracking error', () => {
276-
const shapeNumber = 1;
277-
loadOpenCV();
278-
// We will start testing tracking from 2nd frame because it's a bit unstable on inintialization
279-
cy.goToNextFrame(1);
280-
cy.createOpenCVTrack(createRectangleTrack2Points);
281-
cy.get('.cvat-tracking-notice').should('not.exist');
282-
cy.get(`#cvat_canvas_shape_${shapeNumber}`)
283-
.then(() => {
284-
cy.get('.cvat-tracking-notice').should('not.exist');
285-
cy.get(`#cvat-objects-sidebar-state-item-${shapeNumber}`)
286-
.should('contain', 'RECTANGLE TRACK');
287-
// We don't actually check tracking functionality, we just doing load testing
288-
});
289-
cy.goToNextFrame(2);
290-
cy.get('.ant-notification-notice-message').contains('Tracking error').should('not.exist');
291-
});
292258
});
293259
});

0 commit comments

Comments
 (0)