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

CVAT-3D-M3 #2768

Merged
merged 82 commits into from
Feb 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
a40d8dd
CVAT-3D Updated the Mime Types with Bin Support, added dependency of …
Dec 7, 2020
6bcac4a
CVAT-3D Added additional column as Dimension for engine_task table an…
Dec 7, 2020
db27800
Added Support for 3D file Upload in BIN and PCD.
Dec 7, 2020
7f89251
Added Dimension attribute defaulting to 2D for importer and exporter.
Dec 7, 2020
0fd3742
Added props passing for dimension attribute, filtering of import, Mig…
Dec 7, 2020
3be8ef9
Modified code as per review comments
Dec 14, 2020
6357751
Updated Unit test cases for 3D task creation
Dec 14, 2020
6baeed3
Refactored Dimension Enum in UI and backend code
Dec 16, 2020
d0c9b4f
Merging dev code with branch code
Dec 16, 2020
13cd5ff
Resolving conflicts
Dec 16, 2020
5be4b3d
Updated Unit Test Case
Dec 16, 2020
9175c07
Refactored TaskDimension to DimensionType, Simplified usage of Dimens…
Dec 18, 2020
a9972e1
Removing manually created test files
Dec 18, 2020
0877de4
Removing old pcd mime-type mapping
Dec 18, 2020
da61f90
Added test files generated by synthetic data using open3d
Dec 22, 2020
5e302c6
Merge branch 'develop' into cvat-3D-M1
Dec 23, 2020
2fd3282
Merged with develop branch latest changes
Dec 23, 2020
9432068
Added libraries required for open3d
Dec 23, 2020
5675d7c
Added files
Dec 23, 2020
d14226a
Added synthethic pcd,bin and img test files
Dec 23, 2020
733e4bb
Modified test file name
Dec 24, 2020
fc5cf64
Merge branch 'develop' into cvat-3D-M1
Dec 24, 2020
45d276f
Trigger travis ci
Dec 24, 2020
6c0d765
Modified test case to ignore 3D preview images
Dec 24, 2020
86c7494
Trigger notification
Dec 24, 2020
7c3017d
Merge branch 'develop' into cvat-3D-M1
Dec 25, 2020
768a17e
Deleting DS Store files
Dec 25, 2020
6879381
Modified test cases as per review comments
Dec 25, 2020
f0217ca
Merge branch 'develop' into cvat-3D-M1
Dec 30, 2020
2af7627
Checking pre-commit hook
Dec 30, 2020
4b61eb4
Fixed Lint issues - precommit hook verification
Dec 30, 2020
bae77fc
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
Jan 5, 2021
0a47529
Added changes for CVAT-3D Milestone2 changes - Frame Navigation, phot…
Jan 5, 2021
2b5d997
Modified changes
Jan 5, 2021
4720578
Added canvas3D for 3D Perspective
Jan 5, 2021
66c9a25
Added missing files
Jan 5, 2021
284e783
Added code to get image context for 3D view
Jan 5, 2021
68ec5b2
Codacy check for stylesheet
Jan 5, 2021
6461fdd
Modified frame navigantion for 3D View
Jan 6, 2021
2ef6d7c
Modified style for context-image
Jan 6, 2021
605b2c9
Trigger notification
Jan 6, 2021
f24a157
Added Support for 3D file Upload in BIN and PCD.
Dec 7, 2020
9012756
Added props passing for dimension attribute, filtering of import, Mig…
Dec 7, 2020
6f0ccb2
Modified code as per review comments
Dec 14, 2020
d7ff4e7
Refactored Dimension Enum in UI and backend code
Dec 16, 2020
18bacda
Merged with develop branch latest changes
Dec 23, 2020
b3c812f
Added files
Dec 23, 2020
36d5a8c
Added changes for CVAT-3D Milestone2 changes - Frame Navigation, phot…
Jan 5, 2021
28e9a23
Modified changes
Jan 5, 2021
12cc4e5
Added canvas3D for 3D Perspective
Jan 5, 2021
e94fe57
Added missing files
Jan 5, 2021
6d6b94b
Added code to get image context for 3D view
Jan 5, 2021
aaa76a4
Codacy check for stylesheet
Jan 5, 2021
99de3a8
Modified frame navigantion for 3D View
Jan 6, 2021
42419e3
Modified style for context-image
Jan 6, 2021
342508c
Merged develop branch code
Jan 11, 2021
deb6fe9
Changed cvat-data lint issues
Jan 11, 2021
15d584b
Modified to use opencv as per review comments
Jan 13, 2021
190a81b
Removed unwanted imports
Jan 13, 2021
a977551
Fixed css and added usage of hooks
Jan 22, 2021
f91ef22
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
Jan 27, 2021
1a328a5
Merged Develop branch code
Jan 28, 2021
84ac9d3
Removed unused data structures
Jan 29, 2021
c1ae3db
Removed unused data structures
Jan 29, 2021
369470b
Refactored unused data structures
Jan 29, 2021
1cc14be
Merge branch 'cvat-3D-M2' of https://github.com/manasars/cvat into cv…
Jan 29, 2021
3ff9674
Added three js dependency in cvat ui package-lock.json
Jan 29, 2021
c8eba08
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
Feb 1, 2021
bccdc82
Merged develop branch code and refactored code
Feb 1, 2021
bec220f
Fixed snyk issue
Feb 1, 2021
374beec
Modified Camera Icon in photo-context
Feb 1, 2021
b357436
Update icons.tsx
manasars Feb 1, 2021
cb99ff4
Remove unused svg file
Feb 2, 2021
3d53bd5
Merge branch 'cvat-3D-M2' of https://github.com/manasars/cvat into cv…
Feb 2, 2021
38a9b3f
Modified changelog file
Feb 2, 2021
8f7ed8c
Added changes for CVAT-3D Milestone3
Feb 4, 2021
bdca170
Merged latest develop branch code
Feb 4, 2021
1bfdce8
Rebase with Develop branch
Feb 5, 2021
9fee962
Fixed review comment changes
Feb 10, 2021
d86f733
Added missing line as per codacy check
Feb 10, 2021
fc78d27
Fixed blinking issue
Feb 16, 2021
e8f4400
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
Feb 16, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- CVAT-3D: Load all frames corresponding to the job instance
(<https://github.com/openvinotoolkit/cvat/pull/2645>)
- Intelligent scissors with OpenCV javascript (<https://github.com/openvinotoolkit/cvat/pull/2689>)
- CVAT-3D: Visualize 3D point cloud spaces in 3D View, Top View Side View and Front View (<https://github.com/openvinotoolkit/cvat/pull/2768>)
- [Inside Outside Guidence](https://github.com/shiyinzhang/Inside-Outside-Guidance) serverless
function for interative segmentation
- Pre-built [cvat_server](https://hub.docker.com/r/openvino/cvat_server) and
Expand Down
6 changes: 3 additions & 3 deletions components/analytics/docker-compose.analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ services:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
environment:
LOGSTASH_OUTPUT_HOST: elasticsearch:9200
LOGSTASH_OUTPUT_USER:
LOGSTASH_OUTPUT_PASS:
LOGSTASH_OUTPUT_HOST: elasticsearch:9200
LOGSTASH_OUTPUT_USER:
LOGSTASH_OUTPUT_PASS:
depends_on: ['cvat_elasticsearch']
restart: always

Expand Down
2 changes: 0 additions & 2 deletions cvat-canvas3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ npm run build -- --mode=development # without a minification
interface Canvas3d {
html(): HTMLDivElement;
setup(frameData: any): void;
fitCanvas(): void;
mode(): Mode;
isAbleToChangeFrame(): boolean;
render(): void;
Expand All @@ -46,5 +45,4 @@ console.log('Current mode is ', window.canvas.mode());

// Put canvas to a html container
htmlContainer.appendChild(canvas.html());
canvas.fitCanvas();
```
10 changes: 10 additions & 0 deletions cvat-canvas3d/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion cvat-canvas3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"webpack-dev-server": "^3.11.0"
},
"dependencies": {
"three": "^0.125.0"
"three": "^0.125.0",
"camera-controls": "^1.25.3"
}
}
16 changes: 8 additions & 8 deletions cvat-canvas3d/src/typescript/canvas3d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
import pjson from '../../package.json';
import { Canvas3dController, Canvas3dControllerImpl } from './canvas3dController';
import { Canvas3dModel, Canvas3dModelImpl, Mode } from './canvas3dModel';
import { Canvas3dView, Canvas3dViewImpl } from './canvas3dView';
import { Canvas3dView, Canvas3dViewImpl, ViewsDOM } from './canvas3dView';
import { Master } from './master';

const Canvas3dVersion = pjson.version;

interface Canvas3d {
html(): any;
html(): ViewsDOM;
setup(frameData: any): void;
isAbleToChangeFrame(): boolean;
fitCanvas(): void;
mode(): Mode;
render(): void;
keyControls(keys: KeyboardEvent): void;
}

class Canvas3dImpl implements Canvas3d {
Expand All @@ -30,10 +30,14 @@ class Canvas3dImpl implements Canvas3d {
this.view = new Canvas3dViewImpl(this.model, this.controller);
}

public html(): any {
public html(): ViewsDOM {
return this.view.html();
}

public keyControls(keys: KeyboardEvent): void {
this.view.keyControls(keys);
}

public render(): void {
this.view.render();
}
Expand All @@ -49,10 +53,6 @@ class Canvas3dImpl implements Canvas3d {
public isAbleToChangeFrame(): boolean {
return this.model.isAbleToChangeFrame();
}

public fitCanvas(): void {
this.model.fitCanvas(this.view.html().clientWidth, this.view.html().clientHeight);
}
}

export { Canvas3dImpl as Canvas3d, Canvas3dVersion };
93 changes: 38 additions & 55 deletions cvat-canvas3d/src/typescript/canvas3dModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,26 @@ export enum Mode {
INTERACT = 'interact',
}

export interface Canvas3dModel {
export interface Canvas3dDataModel {
canvasSize: Size;
image: Image | null;
imageID: number | null;
imageOffset: number;
imageSize: Size;
drawData: DrawData;
mode: Mode;
exception: Error | null;
}

export interface Canvas3dModel {
mode: Mode;
data: Canvas3dDataModel;
setup(frameData: any): void;

isAbleToChangeFrame(): boolean;

fitCanvas(width: number, height: number): void;
}

export class Canvas3dModelImpl extends MasterImpl implements Canvas3dModel {
private data: {
canvasSize: Size;
image: Image | null;
imageID: number | null;
imageOffset: number;
imageSize: Size;
drawData: DrawData;
mode: Mode;
exception: Error | null;
};
public data: Canvas3dDataModel;

public constructor() {
super();
Expand All @@ -92,36 +91,32 @@ export class Canvas3dModelImpl extends MasterImpl implements Canvas3dModel {

public setup(frameData: any): void {
if (this.data.imageID !== frameData.number) {
if ([Mode.EDIT, Mode.DRAG, Mode.RESIZE].includes(this.data.mode)) {
throw Error(`Canvas is busy. Action: ${this.data.mode}`);
}
this.data.imageID = frameData.number;
frameData
.data((): void => {
this.data.image = null;
this.notify(UpdateReasons.IMAGE_CHANGED);
})
.then((data: Image): void => {
if (frameData.number !== this.data.imageID) {
// already another image
return;
}

this.data.imageSize = {
height: frameData.height as number,
width: frameData.width as number,
};

this.data.image = data;
this.notify(UpdateReasons.IMAGE_CHANGED);
})
.catch((exception: any): void => {
this.data.exception = exception;
this.notify(UpdateReasons.DATA_FAILED);
throw exception;
});
}

this.data.imageID = frameData.number;
frameData
.data((): void => {
this.data.image = null;
this.notify(UpdateReasons.IMAGE_CHANGED);
})
.then((data: Image): void => {
if (frameData.number !== this.data.imageID) {
// already another image
return;
}

this.data.imageSize = {
height: frameData.height as number,
width: frameData.width as number,
};

this.data.image = data;
this.notify(UpdateReasons.IMAGE_CHANGED);
})
.catch((exception: any): void => {
this.data.exception = exception;
this.notify(UpdateReasons.DATA_FAILED);
throw exception;
});
}

public set mode(value: Mode) {
Expand All @@ -138,16 +133,4 @@ export class Canvas3dModelImpl extends MasterImpl implements Canvas3dModel {

return !isUnable;
}

public fitCanvas(width: number, height: number): void {
this.data.canvasSize.height = height;
this.data.canvasSize.width = width;

this.data.imageOffset = Math.floor(
Math.max(this.data.canvasSize.height / FrameZoom.MIN, this.data.canvasSize.width / FrameZoom.MIN),
);

this.notify(UpdateReasons.FITTED_CANVAS);
this.notify(UpdateReasons.OBJECTS_UPDATED);
}
}
Loading