Skip to content

Commit

Permalink
Honey pot server (cvat-ai#6204)
Browse files Browse the repository at this point in the history
The server part of cvat-ai#6039 

- Added support for Ground Truth jobs in a task
- Added support for job creation and removal (only Ground Truth jobs can
  be created or removed in a task)
- Added a component to autocompute quality metrics for a task
- Added tests
- Fixed cvat-ai#5971 (both parts - the
  outside problem and the manifest problem, the manifest part fix is also
  available in cvat-ai#6216)

Co-authored-by: klakhov <kirill.9992@gmail.com>
Co-authored-by: Roman Donchenko <roman@cvat.ai>
Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai>
  • Loading branch information
4 people committed Jun 12, 2023
1 parent 5fa11c9 commit 9a600f3
Show file tree
Hide file tree
Showing 77 changed files with 19,644 additions and 2,299 deletions.
1 change: 1 addition & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
cvat-sdk/**/*.py
cvat-cli/**/*.py
tests/python/**/*.py
cvat/apps/quality_control/**/*.py
dir_names: true

- name: Run checks
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/isort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
cvat-sdk/**/*.py
cvat-cli/**/*.py
tests/python/**/*.py
cvat/apps/quality_control/**/*.py
dir_names: true

- name: Run checks
Expand Down
54 changes: 49 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,26 @@
],
"justMyCode": false,
},
{
"name": "REST API tests: Attach to RQ quality reports worker",
"type": "python",
"request": "attach",
"connect": {
"host": "127.0.0.1",
"port": 9094
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/django/"
},
{
"localRoot": "${workspaceFolder}/.env",
"remoteRoot": "/opt/venv",
}
],
"justMyCode": false,
},
{
"type": "pwa-chrome",
"request": "launch",
Expand Down Expand Up @@ -199,21 +219,44 @@
"console": "internalConsole"
},
{
"name": "server: RQ - scheduler",
"name": "server: RQ - quality reports",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"justMyCode": false,
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/manage.py",
"args": [
"rqscheduler",
"--queue",
"export"
"rqworker",
"quality_reports",
"--worker-class",
"cvat.rqworker.SimpleWorker",
],
"django": true,
"cwd": "${workspaceFolder}",
"env": {},
"env": {
"DJANGO_LOG_SERVER_HOST": "localhost",
"DJANGO_LOG_SERVER_PORT": "8282"
},
"console": "internalConsole"
},
{
"name": "server: RQ - scheduler",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"justMyCode": false,
"python": "${command:python.interpreterPath}",
"program": "${workspaceRoot}/rqscheduler.py",
"django": true,
"cwd": "${workspaceFolder}",
"args": [
"-i", "1"
],
"env": {
"DJANGO_LOG_SERVER_HOST": "localhost",
"DJANGO_LOG_SERVER_PORT": "8282"
},
"console": "internalConsole"
},
{
Expand Down Expand Up @@ -455,6 +498,7 @@
"server: RQ - annotation",
"server: RQ - webhooks",
"server: RQ - scheduler",
"server: RQ - quality reports",
"server: RQ - cleaning",
"server: git",
]
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## \[2.5.0] - Unreleased
### Added
- New option ``semi-auto`` is available as annotations source (<https://github.com/opencv/cvat/pull/6263>)
- \[API\] Support for Ground Truth job creation and removal (<https://github.com/opencv/cvat/pull/6204>)
- \[API\] Task quality estimation endpoints (<https://github.com/opencv/cvat/pull/6204>)

### Changed
- TDB

### Changed
Expand Down Expand Up @@ -42,8 +47,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Deletion of uploaded files, including annotations and backups,
after they have been uploaded to the server using the TUS protocol but before an RQ job has been initiated. (<https://github.com/opencv/cvat/pull/5909>)
- Simultaneous creation of tasks or projects with identical names from backups by multiple users.(<https://github.com/opencv/cvat/pull/5909>)
- \[Server API\] The `predefined` sorting method for task data uploads (<https://github.com/opencv/cvat/pull/5083>)
- \[API\] The `predefined` sorting method for task data uploads (<https://github.com/opencv/cvat/pull/5083>)
- Allowed slashes in export filenames. (<https://github.com/opencv/cvat/pull/6265>)
- Dataset export error with `outside` property of tracks (<https://github.com/opencv/cvat/issues/5971>)

## \[2.4.5] - 2023-06-02
### Added
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ COPY --chown=${USER} ssh ${HOME}/.ssh
COPY --chown=${USER} wait-for-it.sh manage.py backend_entrypoint.sh ${HOME}/
COPY --chown=${USER} utils/ ${HOME}/utils
COPY --chown=${USER} cvat/ ${HOME}/cvat
COPY --chown=${USER} rqscheduler.py ${HOME}

ARG COVERAGE_PROCESS_START
RUN if [ "${COVERAGE_PROCESS_START}" ]; then \
Expand Down
11 changes: 5 additions & 6 deletions cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,20 +317,19 @@ FrameData.prototype.data.implementation = async function (onServerRequest) {

function getFrameMeta(jobID, frame): FramesMetaData['frames'][0] {
const { meta, mode, startFrame } = frameDataCache[jobID];
let size = null;
let frameMeta = null;
if (mode === 'interpolation') {
[size] = meta.frames;
[frameMeta] = meta.frames;
} else if (mode === 'annotation') {
if (frame >= meta.size) {
if (frame > meta.stop_frame) {
throw new ArgumentError(`Meta information about frame ${frame} can't be received from the server`);
} else {
size = meta.frames[frame - startFrame];
}
frameMeta = meta.frames[frame - startFrame];
} else {
throw new DataError(`Invalid mode is specified ${mode}`);
}

return size;
return frameMeta;
}

class FrameBuffer {
Expand Down
Loading

0 comments on commit 9a600f3

Please sign in to comment.