Skip to content

Commit

Permalink
Merge branch 'develop' into feature/blob_connection_string
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Sep 12, 2022
2 parents 95e852f + 6464069 commit 10fcd96
Show file tree
Hide file tree
Showing 89 changed files with 2,351 additions and 374 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
mkdir /tmp/cvat_server
mkdir /tmp/cvat_ui
- name: CVAT server. Build and push
- name: CVAT server. Build
uses: docker/build-push-action@v3
with:
cache-from: type=local,src=/tmp/cvat_cache_server
Expand All @@ -78,7 +78,7 @@ jobs:
tags: cvat/server
outputs: type=docker,dest=/tmp/cvat_server/image.tar

- name: CVAT UI. Build and push
- name: CVAT UI. Build
uses: docker/build-push-action@v3
with:
cache-from: type=local,src=/tmp/cvat_cache_ui
Expand Down Expand Up @@ -162,6 +162,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/server:dev
docker image ls -a
- name: Running REST API and SDK tests
Expand Down Expand Up @@ -217,6 +219,7 @@ jobs:
- name: Load Docker images
run: |
docker load --input /tmp/cvat_server/image.tar
docker tag cvat/server:latest cvat/server:dev
docker image ls -a
- name: Running OPA tests
Expand Down Expand Up @@ -246,17 +249,15 @@ jobs:
LOGS_DIR: "${{ github.workspace }}/unit_testing"
run: |
mkdir $LOGS_DIR
docker logs cvat > $LOGS_DIR/cvat.log
docker logs cvat_server > $LOGS_DIR/cvat.log
docker logs cvat_opa 2> $LOGS_DIR/cvat_opa.log
- name: Uploading "cvat" container logs as an artifact
if: failure()
uses: actions/upload-artifact@v2
env:
LOGS_DIR: "${{ github.workspace }}/unit_testing"
with:
name: container_logs
path: $LOGS_DIR
path: "${{ github.workspace }}/unit_testing"

e2e_testing:
needs: build
Expand Down Expand Up @@ -296,6 +297,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/ui:dev
docker image ls -a
- name: Run CVAT instance
Expand Down Expand Up @@ -336,18 +339,20 @@ jobs:
npx cypress run \
--headed \
--browser chrome \
--env coverage=false
--config-file cypress_canvas3d.json \
--spec 'cypress/integration/${{ matrix.specs }}/**/*.js,cypress/integration/remove_users_tasks_projects_organizations.js'
else
npx cypress run \
--browser chrome \
--env coverage=false
--spec 'cypress/integration/${{ matrix.specs }}/**/*.js,cypress/integration/remove_users_tasks_projects_organizations.js'
fi
- name: Creating a log file from "cvat" container logs
if: failure()
run: |
docker logs cvat > ${{ github.workspace }}/tests/cvat_${{ matrix.specs }}.log
docker logs cvat_server > ${{ github.workspace }}/tests/cvat_${{ matrix.specs }}.log
- name: Uploading "cvat" container logs as an artifact
if: failure()
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/ui:dev
docker image ls -a
- name: Running REST API tests
Expand Down Expand Up @@ -181,6 +183,7 @@ jobs:
- name: Load Docker server image
run: |
docker load --input /tmp/cvat_server/image.tar
docker tag cvat/server:latest cvat/server:dev
docker image ls -a
- name: Running OPA tests
Expand Down Expand Up @@ -211,7 +214,7 @@ jobs:
LOGS_DIR: "${{ github.workspace }}/unit_testing"
run: |
mkdir $LOGS_DIR
docker logs cvat > $LOGS_DIR/cvat.log
docker logs cvat_server > $LOGS_DIR/cvat.log
docker logs cvat_opa 2> $LOGS_DIR/cvat_opa.log
- name: Uploading "cvat" container logs as an artifact
Expand Down Expand Up @@ -256,6 +259,8 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:dev
docker tag cvat/ui:latest cvat/ui:dev
docker image ls -a
- name: Run CVAT instance
Expand Down Expand Up @@ -301,7 +306,7 @@ jobs:
- name: Creating a log file from "cvat" container logs
if: failure()
run: |
docker logs cvat > ${{ github.workspace }}/tests/cvat_${{ matrix.specs }}.log
docker logs cvat_server > ${{ github.workspace }}/tests/cvat_${{ matrix.specs }}.log
- name: Uploading "cvat" container logs as an artifact
if: failure()
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
- name: Pull CVAT server image
run: |
docker pull ${{ steps.meta-server.outputs.tags }}
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server:dev
- name: OPA tests
run: |
Expand Down Expand Up @@ -308,10 +308,10 @@ jobs:
- name: Pull CVAT UI image
run: |
docker pull ${{ steps.meta-server.outputs.tags }}
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server:dev
docker pull ${{ steps.meta-ui.outputs.tags }}
docker tag ${{ steps.meta-ui.outputs.tags }} cvat/ui
docker tag ${{ steps.meta-ui.outputs.tags }} cvat/ui:dev
- name: Run CVAT instance
run: |
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
- name: Creating a log file from "cvat" container logs
if: failure()
run: |
docker logs cvat > ${{ github.workspace }}/tests/cvat.log
docker logs cvat_server > ${{ github.workspace }}/tests/cvat.log
- name: Uploading cypress screenshots as an artifact
if: failure()
Expand Down Expand Up @@ -430,7 +430,7 @@ jobs:
- name: Pull CVAT server image
run: |
docker pull ${{ steps.meta-server.outputs.tags }}
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server
docker tag ${{ steps.meta-server.outputs.tags }} cvat/server:dev
- name: Downloading coverage results
uses: actions/download-artifact@v2
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Skeleton (<https://github.com/cvat-ai/cvat/pull/1>), (<https://github.com/opencv/cvat/pull/4829>)
- Added helm chart support for serverless functions and analytics (<https://github.com/cvat-ai/cvat/pull/110>)
- Added confirmation when remove a track (<https://github.com/opencv/cvat/pull/4846>)
- [COCO Keypoints](https://cocodataset.org/#keypoints-2020) format support (<https://github.com/opencv/cvat/pull/4821>,
<https://github.com/opencv/cvat/pull/4908>)
- Support for Oracle OCI Buckets (<https://github.com/opencv/cvat/pull/4876>)
- `cvat-sdk` and `cvat-cli` packages on PyPI (<https://github.com/opencv/cvat/pull/4903>)
- Add support for Azure Blob Storage connection string authentication(<https://github.com/openvinotoolkit/cvat/pull/4649>)

### Changed
Expand Down Expand Up @@ -56,6 +60,10 @@ Skeleton (<https://github.com/cvat-ai/cvat/pull/1>), (<https://github.com/opencv
- Creating task with cloud storage data (<https://github.com/cvat-ai/cvat/pull/116>)
- Show empty tasks (<https://github.com/cvat-ai/cvat/pull/100>)
- Fixed project filtration (<https://github.com/opencv/cvat/pull/4878>)
- Maximum callstack exceed when create task with 100000+ files from cloud storage (<https://github.com/opencv/cvat/pull/4836>)
- Fixed invocation of serverless functions (<https://github.com/opencv/cvat/pull/4907>)
- Removing label attributes (<https://github.com/opencv/cvat/pull/4927>)
- Notification with a required manifest file (<https://github.com/opencv/cvat/pull/4921>)

### Security
- TDB
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ For more information about the supported formats, look at the
| Segmentation masks from [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | ✔️ | ✔️ |
| [YOLO](https://pjreddie.com/darknet/yolo/) | ✔️ | ✔️ |
| [MS COCO Object Detection](http://cocodataset.org/#format-data) | ✔️ | ✔️ |
| [MS COCO Keypoints Detection](http://cocodataset.org/#format-data) | ✔️ | ✔️ |
| [TFrecord](https://www.tensorflow.org/tutorials/load_data/tfrecord) | ✔️ | ✔️ |
| [MOT](https://motchallenge.net/) | ✔️ | ✔️ |
| [LabelMe 3.0](http://labelme.csail.mit.edu/Release3.0) | ✔️ | ✔️ |
Expand Down
6 changes: 6 additions & 0 deletions components/serverless/docker-compose.serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ services:
cvat_server:
environment:
CVAT_SERVERLESS: 1
extra_hosts:
- "host.docker.internal:host-gateway"

cvat_worker_low:
extra_hosts:
- "host.docker.internal:host-gateway"

volumes:
cvat_events:
2 changes: 1 addition & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.15.1",
"version": "2.15.3",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ export class CanvasViewImpl implements CanvasView, Listener {
}

if (data) {
const { clientID, points } = data as any;
const { clientID, elements } = data as any;
const points = data.points || elements.map((el: any) => el.points).flat();
if (typeof clientID === 'number') {
const event: CustomEvent = new CustomEvent('canvas.canceled', {
bubbles: false,
Expand Down
4 changes: 2 additions & 2 deletions cvat-canvas/src/typescript/drawHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class DrawHandlerImpl implements DrawHandler {
y: number;
};
private crosshair: Crosshair;
private drawData: DrawData;
private drawData: DrawData | null;
private geometry: Geometry;
private autoborderHandler: AutoborderHandler;
private autobordersEnabled: boolean;
Expand All @@ -100,7 +100,7 @@ export class DrawHandlerImpl implements DrawHandler {
private initialized: boolean;
private canceled: boolean;
private pointsGroup: SVG.G | null;
private shapeSizeElement: ShapeSizeElement;
private shapeSizeElement: ShapeSizeElement | null;

private getFinalEllipseCoordinates(points: number[], fitIntoFrame: boolean): number[] {
const { offset } = this.geometry;
Expand Down
8 changes: 4 additions & 4 deletions cvat-canvas/src/typescript/editHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export interface EditHandler {
export class EditHandlerImpl implements EditHandler {
private onEditDone: (state: any, points: number[]) => void;
private autoborderHandler: AutoborderHandler;
private geometry: Geometry;
private geometry: Geometry | null;
private canvas: SVG.Container;
private editData: EditData;
private editedShape: SVG.Shape;
private editLine: SVG.PolyLine;
private editData: EditData | null;
private editedShape: SVG.Shape | null;
private editLine: SVG.PolyLine | null;
private clones: SVG.Polygon[];
private controlPointsSize: number;
private autobordersEnabled: boolean;
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/src/typescript/groupHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class GroupHandlerImpl implements GroupHandler {
private bindedOnSelectStart: (event: MouseEvent) => void;
private bindedOnSelectUpdate: (event: MouseEvent) => void;
private bindedOnSelectStop: (event: MouseEvent) => void;
private selectionRect: SVG.Rect;
private selectionRect: SVG.Rect | null;
private startSelectionPoint: {
x: number;
y: number;
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/src/typescript/mergeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class MergeHandlerImpl implements MergeHandler {
private constraints: {
labelID: number;
shapeType: string;
};
} | null;

private addConstraints(): void {
const shape = this.statesToBeMerged[0];
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/src/typescript/splitHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SplitHandlerImpl implements SplitHandler {
private onSplitDone: (object: any) => void;
private onFindObject: (event: MouseEvent) => void;
private canvas: SVG.Container;
private highlightedShape: SVG.Shape;
private highlightedShape: SVG.Shape | null;
private initialized: boolean;
private splitDone: boolean;

Expand Down
58 changes: 57 additions & 1 deletion cvat-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,67 @@
# Command-line client for CVAT

A simple command line interface for working with CVAT tasks. At the moment it
implements a basic feature set but may serve as the starting point for a more
comprehensive CVAT administration tool in the future.

Overview of functionality:

- Create a new task (supports name, bug tracker, project, labels JSON, local/share/remote files)
- Delete tasks (supports deleting a list of task IDs)
- List all tasks (supports basic CSV or JSON output)
- Download JPEG frames (supports a list of frame IDs)
- Dump annotations (supports all formats via format string)
- Upload annotations for a task in the specified format (e.g. 'YOLO ZIP 1.0')
- Export and download a whole task
- Import a task

## Installation

`pip install cvat-cli/`
`pip install cvat-cli`

## Usage

```bash
$ cvat-cli --help

usage: cvat-cli [-h] [--version] [--auth USER:[PASS]]
[--server-host SERVER_HOST] [--server-port SERVER_PORT] [--debug]
{create,delete,ls,frames,dump,upload,export,import} ...

Perform common operations related to CVAT tasks.

positional arguments:
{create,delete,ls,frames,dump,upload,export,import}

optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--auth USER:[PASS] defaults to the current user and supports the PASS
environment variable or password prompt
(default: current user)
--server-host SERVER_HOST
host (default: localhost)
--server-port SERVER_PORT
port (default: 8080)
--debug show debug output
```
## Examples
Create a task with local images:
```bash
cvat-cli --auth user create
--labels '[{"name": "car"}, {"name": "person"}]'
"test_task"
"local"
"image1.jpg" "image2.jpg"
```
List tasks on a custom server with auth:
```bash
cvat-cli --auth admin:password \
--server-host cvat.my.server.com --server-port 30123 \
ls
```
2 changes: 1 addition & 1 deletion cvat-cli/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cvat-sdk==2.0
cvat-sdk~=2.1.0
Pillow>=6.2.0
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, client: Client, credentials: Tuple[str, str]):

# allow arbitrary kwargs in models
# TODO: will silently ignore invalid args, so remove this ASAP
self.client.api.configuration.discard_unknown_keys = True
self.client.api_client.configuration.discard_unknown_keys = True

self.client.login(credentials)

Expand Down
11 changes: 4 additions & 7 deletions cvat-cli/src/cvat_cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@ def make_cmdline_parser() -> argparse.ArgumentParser:
"--server-host", type=str, default="localhost", help="host (default: %(default)s)"
)
parser.add_argument(
"--server-port", type=int, default="8080", help="port (default: %(default)s)"
)
parser.add_argument(
"--https",
default=False,
action="store_true",
help="using https connection (default: %(default)s)",
"--server-port",
type=int,
default=None,
help="port (default: 80 for http and 443 for https connections)",
)
parser.add_argument(
"--debug",
Expand Down
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.2-alpha"
VERSION = "2.1.0.post1"
Loading

0 comments on commit 10fcd96

Please sign in to comment.