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

Merge annotations and dataset_manager apps #1352

Merged
merged 88 commits into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
9c87cdc
Move annotations to dm
zhiltsov-max Mar 30, 2020
06d6217
Refactor dm
zhiltsov-max Mar 30, 2020
40375f0
Rename data manager
zhiltsov-max Mar 31, 2020
8c64a9a
Move anno dump and upload functions
zhiltsov-max Mar 31, 2020
ce9c0a8
Join server host and port in cvat cli
zhiltsov-max Apr 2, 2020
cf181ae
Move export templates dir
zhiltsov-max Apr 3, 2020
76c48c7
add dm project exporter
zhiltsov-max Apr 3, 2020
a2f00f5
update mask format support
zhiltsov-max Apr 3, 2020
37a4a03
Use decorators for formats definition
zhiltsov-max Apr 3, 2020
7736039
Update formats
zhiltsov-max Apr 3, 2020
ba75d7c
Update format implementations
zhiltsov-max Apr 6, 2020
8b0173a
remove parameter
zhiltsov-max Apr 6, 2020
5c770b4
Add dm views
zhiltsov-max Apr 6, 2020
527123b
Move annotation components to dm
zhiltsov-max Apr 6, 2020
a758550
restore extension for export formats
zhiltsov-max Apr 7, 2020
81404b1
update rest api
zhiltsov-max Apr 7, 2020
92b1bba
use serializers, update views
zhiltsov-max Apr 7, 2020
ae7974e
merge develop
zhiltsov-max Apr 7, 2020
f8e2663
Update format names
zhiltsov-max Apr 9, 2020
927ca56
Update docs
zhiltsov-max Apr 9, 2020
cc04df1
Update tests
zhiltsov-max Apr 9, 2020
2d2ca2d
move test
zhiltsov-max Apr 9, 2020
0263a0e
fix import
zhiltsov-max Apr 9, 2020
ec52ecd
Extend format tests
zhiltsov-max Apr 9, 2020
76f496e
django compatibility for directory access
zhiltsov-max Apr 9, 2020
1f4612c
move tests
zhiltsov-max Apr 9, 2020
e139e98
update module links
zhiltsov-max Apr 9, 2020
acf79ca
fixes
zhiltsov-max Apr 9, 2020
c3d8ed1
fix git application
zhiltsov-max Apr 10, 2020
5567e54
fixes
zhiltsov-max Apr 10, 2020
c46769f
add extension recommentation
zhiltsov-max Apr 10, 2020
8ef19aa
fixes
zhiltsov-max Apr 13, 2020
1c42d41
api
zhiltsov-max Apr 13, 2020
780e108
join api methods
zhiltsov-max Apr 13, 2020
951bcb4
Add trim whitespace to workspace config
zhiltsov-max Apr 14, 2020
3c5caae
update tests
zhiltsov-max Apr 14, 2020
fce56ca
fixes
zhiltsov-max Apr 14, 2020
c87ece3
Update format docs
zhiltsov-max Apr 14, 2020
1e5f992
join format queries
zhiltsov-max Apr 15, 2020
73edf83
fixes
zhiltsov-max Apr 15, 2020
1915bb7
update new ui
zhiltsov-max Apr 15, 2020
d7ff4de
ui tests
zhiltsov-max Apr 15, 2020
01e176d
old ui
zhiltsov-max Apr 15, 2020
f14571f
update js bundles
zhiltsov-max Apr 15, 2020
fb1c177
linter fixes
zhiltsov-max Apr 15, 2020
7b1e758
add image with loader tests
zhiltsov-max Apr 15, 2020
5111148
fix linter
zhiltsov-max Apr 15, 2020
a94cc5e
fix frame step and frame access
zhiltsov-max Apr 16, 2020
fa0ac2a
use server file name for annotations export
zhiltsov-max Apr 16, 2020
daea029
update cvat core
zhiltsov-max Apr 16, 2020
9fa1957
add import hack for rest api tests
zhiltsov-max Apr 17, 2020
ff07d8c
move cli tests
zhiltsov-max Apr 17, 2020
1edd1ab
fix cvat format converter args parsing
zhiltsov-max Apr 17, 2020
d7bc832
remove folder on extract error
zhiltsov-max Apr 17, 2020
4f88440
print error message on incorrect xpath expression
zhiltsov-max Apr 17, 2020
1ace725
use own categories when no others exist
zhiltsov-max Apr 17, 2020
ca2384a
update changelog
zhiltsov-max Apr 17, 2020
6a244cf
Merge branch 'develop' into zm/merge-anno-and-dm-2
zhiltsov-max Apr 17, 2020
51581b7
really add text to changelog
zhiltsov-max Apr 17, 2020
c87bf6b
Merge branch 'zm/merge-anno-and-dm-2' of https://github.com/opencv/cv…
zhiltsov-max Apr 17, 2020
d991f11
Fix annotation window menu
zhiltsov-max Apr 20, 2020
7595119
fix ui
zhiltsov-max Apr 24, 2020
6b29167
fix replace
zhiltsov-max Apr 24, 2020
5cbdb3e
update extra apps
zhiltsov-max Apr 24, 2020
d69c0a4
format readme
zhiltsov-max Apr 24, 2020
5ad4b09
readme
zhiltsov-max Apr 24, 2020
0d36cc3
Merge remote-tracking branch 'origin/develop' into zm/merge-anno-and-…
zhiltsov-max Apr 24, 2020
cdb26c1
linter
zhiltsov-max Apr 24, 2020
0ca795e
Merge branch 'develop' into zm/merge-anno-and-dm-2
zhiltsov-max Apr 27, 2020
3ad5e25
Fix old ui
zhiltsov-max Apr 27, 2020
10a00e9
Update CHANGELOG.md
nmanovic Apr 27, 2020
61b7740
Merge branch 'develop' into zm/merge-anno-and-dm-2
zhiltsov-max Apr 27, 2020
6bf194b
update user guide
zhiltsov-max Apr 27, 2020
fd41e1d
linter
zhiltsov-max Apr 27, 2020
28d3e52
more linter fixes
zhiltsov-max Apr 27, 2020
d1db65f
Merge branch 'develop' into zm/merge-anno-and-dm-2
zhiltsov-max May 6, 2020
95c7068
Update changelog
zhiltsov-max May 6, 2020
4b8016a
Merge remote-tracking branch 'origin/develop' into zm/merge-anno-and-…
zhiltsov-max May 6, 2020
1d4cb1f
fix merge
zhiltsov-max May 6, 2020
95180eb
Merge branch 'develop' into zm/merge-anno-and-dm-2
zhiltsov-max May 7, 2020
8d3b0ae
remove duplicating lines from changelog
zhiltsov-max May 7, 2020
13ea752
fix ci tests
zhiltsov-max May 7, 2020
c9dfff4
revert unnecessary changes in user_guide
zhiltsov-max May 7, 2020
5728cfd
revert changes in js libraries
zhiltsov-max May 7, 2020
80e04c6
rebuild cvat-core
zhiltsov-max May 7, 2020
9d32c57
fix uploading in old ui
zhiltsov-max May 7, 2020
79e7e9f
fix cvat xml uploading
zhiltsov-max May 7, 2020
ae7c237
Bump cvat-core and cvat-ui versions
zhiltsov-max May 8, 2020
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ before_script:
- mkdir -m a=rwx -p ${HOST_COVERAGE_DATA_DIR}

script:
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps utils/cli && coverage run -a --source cvat/apps/ manage.py test --pattern="_tests.py" cvat/apps/dataset_manager && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}'
# FIXME: Git package and application name conflict in PATH
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps && coverage run -a manage.py test --pattern="_test*.py" cvat/apps/dataset_manager/tests cvat/apps/engine/tests utils/cli && coverage run -a manage.py test datumaro/ && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}'
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd cvat-data && npm install && cd ../cvat-core && npm install && npm run test && mv ./reports/coverage/lcov.info ${CONTAINER_COVERAGE_DATA_DIR}'

after_success:
# https://coveralls-python.readthedocs.io/en/latest/usage/multilang.html
- mv ${HOST_COVERAGE_DATA_DIR}/* .
- coveralls-lcov -v -n lcov.info > coverage.json
- coveralls --merge=coverage.json
- coveralls --merge=coverage.json
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
"./datumaro",
],
"licenser.license": "Custom",
"licenser.customHeader": "Copyright (C) @YEAR@ Intel Corporation\n\nSPDX-License-Identifier: MIT"
"licenser.customHeader": "Copyright (C) @YEAR@ Intel Corporation\n\nSPDX-License-Identifier: MIT",
"files.trimTrailingWhitespace": true
}
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.0.0] - Unreleased
### Added
-
- Added `datumaro_project` export format (https://github.com/opencv/cvat/pull/1352)

### Changed
- cvat-core: session.annotations.put() now returns identificators of added objects (<https://github.com/opencv/cvat/pull/1493>)
- Downloaded file name in annotations export became more informative (https://github.com/opencv/cvat/pull/1352)
- Added auto trimming for trailing whitespaces style enforsement (https://github.com/opencv/cvat/pull/1352)
- REST API: updated `GET /task/<id>/annotations`: parameters are `format`, `filename` (now optional), `action` (optional) (https://github.com/opencv/cvat/pull/1352)
- REST API: removed `dataset/formats`, changed format of `annotation/formats` (https://github.com/opencv/cvat/pull/1352)
- Exported annotations are stored for N hours instead of indefinitely (https://github.com/opencv/cvat/pull/1352)
- Formats: CVAT format now accepts ZIP and XML (https://github.com/opencv/cvat/pull/1352)
- Formats: COCO format now accepts ZIP and JSON (https://github.com/opencv/cvat/pull/1352)
- Formats: most of formats renamed, no extension in title (https://github.com/opencv/cvat/pull/1352)
- Formats: definitions are changed, are not stored in DB anymore (https://github.com/opencv/cvat/pull/1352)
- cvat-core: session.annotations.put() now returns identificators of added objects (https://github.com/opencv/cvat/pull/1493)

### Deprecated
-

### Removed
-
- `annotation` application is replaced with `dataset_manager` (https://github.com/opencv/cvat/pull/1352)

### Fixed
- Categories for empty projects with no sources are taken from own dataset (https://github.com/opencv/cvat/pull/1352)
- Added directory removal on error during `extract` command (https://github.com/opencv/cvat/pull/1352)
- Added debug error message on incorrect XPath (https://github.com/opencv/cvat/pull/1352)
- Exporting frame stepped task (https://github.com/opencv/cvat/issues/1294, https://github.com/opencv/cvat/issues/1334)
- Fixed broken command line interface for `cvat` export format in Datumaro (https://github.com/opencv/cvat/issues/1494)
- Updated Rest API document, Swagger document serving instruction issue (https://github.com/opencv/cvat/issues/1495)

### Security
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ for development
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [vscode-remark-lint](https://marketplace.visualstudio.com/items?itemName=drewbourne.vscode-remark-lint)
- [licenser](https://marketplace.visualstudio.com/items?itemName=ymotongpoo.licenser)
- [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces)

- Reload Visual Studio Code from virtual environment

Expand Down
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
[![codebeat badge](https://codebeat.co/badges/53cd0d16-fddc-46f8-903c-f43ed9abb6dd)](https://codebeat.co/projects/github-com-opencv-cvat-develop)
[![DOI](https://zenodo.org/badge/139156354.svg)](https://zenodo.org/badge/latestdoi/139156354)

CVAT is free, online, interactive video and image annotation tool for computer vision. It is being used by our team to annotate million of objects with different properties. Many UI and UX decisions are based on feedbacks from professional data annotation team.
CVAT is free, online, interactive video and image annotation
tool for computer vision. It is being used by our team to
annotate million of objects with different properties. Many UI
and UX decisions are based on feedbacks from professional data annotation team.

![CVAT screenshot](cvat/apps/documentation/static/documentation/images/cvat.jpg)

Expand All @@ -34,21 +37,23 @@ CVAT is free, online, interactive video and image annotation tool for computer v

## Supported annotation formats

Format selection is possible after clicking on the Upload annotation / Dump annotation button.
[Datumaro](datumaro/README.md) dataset framework allows additional dataset transformations
via its command line tool.
Format selection is possible after clicking on the Upload annotation
and Dump annotation buttons. [Datumaro](datumaro/README.md) dataset
framework allows additional dataset transformations
via its command line tool and Python library.

| Annotation format | Dumper | Loader |
| Annotation format | Import | Export |
| ------------------------------------------------------------------------------------------ | ------ | ------ |
| [CVAT XML v1.1 for images](cvat/apps/documentation/xml_format.md#annotation) | X | X |
| [CVAT XML v1.1 for a video](cvat/apps/documentation/xml_format.md#interpolation) | X | X |
| [Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | X | X |
| [CVAT for images](cvat/apps/documentation/xml_format.md#annotation) | X | X |
| [CVAT for a video](cvat/apps/documentation/xml_format.md#interpolation) | X | X |
| [Datumaro](datumaro/README.md) | | X |
| [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | X | X |
| Segmentation masks from [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | X | X |
| [YOLO](https://pjreddie.com/darknet/yolo/) | X | X |
| [MS COCO Object Detection](http://cocodataset.org/#format-data) | X | X |
| PNG class mask + instance mask as in [Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | X | X |
| [TFrecord](https://www.tensorflow.org/tutorials/load_data/tf_records) | X | X |
| [MOT](https://motchallenge.net/) | X | X |
| [LabelMe](http://labelme.csail.mit.edu/Release3.0) | X | X |
| [LabelMe 3.0](http://labelme.csail.mit.edu/Release3.0) | X | X |

## Links
- [Intel AI blog: New Computer Vision Tool Accelerates Annotation of Digital Images and Video](https://www.intel.ai/introducing-cvat)
Expand All @@ -57,14 +62,19 @@ via its command line tool.

## Online Demo

[Onepanel](https://www.onepanel.io/) has added CVAT as an environment into their platform and a running demo of CVAT can be accessed at [CVAT Public Demo](https://c.onepanel.io/onepanel-demo/projects/cvat-public-demo/workspaces?utm_source=cvat).
[Onepanel](https://www.onepanel.io/) has added CVAT as an environment
into their platform and a running demo of CVAT can be accessed at
[CVAT Public Demo](https://c.onepanel.io/onepanel-demo/projects/cvat-public-demo/workspaces?utm_source=cvat).

If you have any questions, please contact Onepanel directly at support@onepanel.io. If you are in the Onepanel application, you can also use the chat icon in the bottom right corner.
If you have any questions, please contact Onepanel directly at
support@onepanel.io. If you are in the Onepanel application, you can also
use the chat icon in the bottom right corner.

## REST API

Automatically generated Swagger documentation for Django REST API is
available on ``<cvat_origin>/api/swagger`` (default: ``localhost:8080/api/swagger``).
available on ``<cvat_origin>/api/swagger``
(default: ``localhost:8080/api/swagger``).

Swagger documentation is visiable on allowed hostes, Update environement variable in docker-compose.yml file with cvat hosted machine IP or domain name. Example - ``ALLOWED_HOSTS: 'localhost, 127.0.0.1'``)

Expand Down
2 changes: 1 addition & 1 deletion cvat-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "1.0.0",
"version": "2.0.0",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "babel.config.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
class Loader {
constructor(initialData) {
const data = {
display_name: initialData.display_name,
format: initialData.format,
handler: initialData.handler,
name: initialData.name,
format: initialData.ext,
version: initialData.version,
};

Expand All @@ -27,7 +26,7 @@
* @readonly
* @instance
*/
get: () => data.display_name,
get: () => data.name,
},
format: {
/**
Expand All @@ -39,16 +38,6 @@
*/
get: () => data.format,
},
handler: {
/**
* @name handler
* @type {string}
* @memberof module:API.cvat.classes.Loader
* @readonly
* @instance
*/
get: () => data.handler,
},
version: {
/**
* @name version
Expand All @@ -71,9 +60,8 @@
class Dumper {
constructor(initialData) {
const data = {
display_name: initialData.display_name,
format: initialData.format,
handler: initialData.handler,
name: initialData.name,
format: initialData.ext,
version: initialData.version,
};

Expand All @@ -86,7 +74,7 @@
* @readonly
* @instance
*/
get: () => data.display_name,
get: () => data.name,
},
format: {
/**
Expand All @@ -98,16 +86,6 @@
*/
get: () => data.format,
},
handler: {
/**
* @name handler
* @type {string}
* @memberof module:API.cvat.classes.Dumper
* @readonly
* @instance
*/
get: () => data.handler,
},
version: {
/**
* @name version
Expand All @@ -127,108 +105,41 @@
* @memberof module:API.cvat.classes
* @hideconstructor
*/
class AnnotationFormat {
class AnnotationFormats {
constructor(initialData) {
const data = {
created_date: initialData.created_date,
updated_date: initialData.updated_date,
id: initialData.id,
owner: initialData.owner,
name: initialData.name,
handler_file: initialData.handler_file,
exporters: initialData.exporters.map((el) => new Dumper(el)),
importers: initialData.importers.map((el) => new Loader(el)),
};

data.dumpers = initialData.dumpers.map((el) => new Dumper(el));
data.loaders = initialData.loaders.map((el) => new Loader(el));

// Now all fields are readonly
Object.defineProperties(this, {
id: {
/**
* @name id
* @type {integer}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.id,
},
owner: {
/**
* @name owner
* @type {integer}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.owner,
},
name: {
/**
* @name name
* @type {string}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.name,
},
createdDate: {
/**
* @name createdDate
* @type {string}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.created_date,
},
updatedDate: {
/**
* @name updatedDate
* @type {string}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.updated_date,
},
handlerFile: {
/**
* @name handlerFile
* @type {string}
* @memberof module:API.cvat.classes.AnnotationFormat
* @readonly
* @instance
*/
get: () => data.handler_file,
},
loaders: {
/**
* @name loaders
* @type {module:API.cvat.classes.Loader[]}
* @memberof module:API.cvat.classes.AnnotationFormat
* @memberof module:API.cvat.classes.AnnotationFormats
* @readonly
* @instance
*/
get: () => [...data.loaders],
get: () => [...data.importers],
},
dumpers: {
/**
* @name dumpers
* @type {module:API.cvat.classes.Dumper[]}
* @memberof module:API.cvat.classes.AnnotationFormat
* @memberof module:API.cvat.classes.AnnotationFormats
* @readonly
* @instance
*/
get: () => [...data.dumpers],
get: () => [...data.exporters],
},
});
}
}

module.exports = {
AnnotationFormat,
AnnotationFormats,
Loader,
Dumper,
};
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
const {
Loader,
Dumper,
} = require('./annotation-format.js');
} = require('./annotation-formats.js');
const {
ScriptingError,
DataError,
Expand Down
9 changes: 2 additions & 7 deletions cvat-core/src/api-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
} = require('./enums');

const User = require('./user');
const { AnnotationFormat } = require('./annotation-format.js');
const { AnnotationFormats } = require('./annotation-formats.js');
const { ArgumentError } = require('./exceptions');
const { Task } = require('./session');

Expand Down Expand Up @@ -66,12 +66,7 @@

cvat.server.formats.implementation = async () => {
const result = await serverProxy.server.formats();
return result.map((el) => new AnnotationFormat(el));
};

cvat.server.datasetFormats.implementation = async () => {
const result = await serverProxy.server.datasetFormats();
return result;
return new AnnotationFormats(result);
};

cvat.server.register.implementation = async (username, firstName, lastName,
Expand Down
16 changes: 1 addition & 15 deletions cvat-core/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function build() {
* @method formats
* @async
* @memberof module:API.cvat.server
* @returns {module:API.cvat.classes.AnnotationFormat[]}
* @returns {module:API.cvat.classes.AnnotationFormats}
* @throws {module:API.cvat.exceptions.PluginError}
* @throws {module:API.cvat.exceptions.ServerError}
*/
Expand All @@ -118,20 +118,6 @@ function build() {
.apiWrapper(cvat.server.formats);
return result;
},
/**
* Method returns available dataset export formats
* @method exportFormats
* @async
* @memberof module:API.cvat.server
* @returns {module:String[]}
* @throws {module:API.cvat.exceptions.PluginError}
* @throws {module:API.cvat.exceptions.ServerError}
*/
async datasetFormats() {
const result = await PluginRegistry
.apiWrapper(cvat.server.datasetFormats);
return result;
},
/**
* Method allows to register on a server
* @method register
Expand Down
Loading