Skip to content

Commit

Permalink
Merge branch 'develop' into zm/z-order-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max authored May 27, 2020
2 parents bae042f + 485bc8d commit 051385c
Show file tree
Hide file tree
Showing 38 changed files with 110 additions and 50 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ability to configure user agreements for the user registration form (https://github.com/opencv/cvat/pull/1464)
- Added cuboid interpolation and cuboid drawing from rectangles (<https://github.com/opencv/cvat/pull/1560>)
- Ability to configure custom pageViewHit, which can be useful for web analytics integration (https://github.com/opencv/cvat/pull/1566)
- Ability to configure access to the analytics page based on roles (https://github.com/opencv/cvat/pull/1592)

### Changed
- Downloaded file name in annotations export became more informative (https://github.com/opencv/cvat/pull/1352)
Expand Down Expand Up @@ -54,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an error when exporting a task with cuboids to any format except CVAT (<https://github.com/opencv/cvat/pull/1577>)
- Synchronization with remote git repo (<https://github.com/opencv/cvat/pull/1582>)
- A problem with mask to polygons conversion when polygons are too small (<https://github.com/opencv/cvat/pull/1581>)
- Unable to upload video with uneven size (<https://github.com/opencv/cvat/pull/1594>)
- Fixed an issue with `z_order` having no effect on segmentations (<https://github.com/opencv/cvat/pull/1589>)

### Security
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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.
Try it online [cvat.org](https://cvat.org).

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

Expand Down Expand Up @@ -60,15 +61,19 @@ via its command line tool and Python library.
- [Intel Software: Computer Vision Annotation Tool: A Universal Approach to Data Annotation](https://software.intel.com/en-us/articles/computer-vision-annotation-tool-a-universal-approach-to-data-annotation)
- [VentureBeat: Intel open-sources CVAT, a toolkit for data labeling](https://venturebeat.com/2019/03/05/intel-open-sources-cvat-a-toolkit-for-data-labeling/)

## Online Demo
## Online demo: [cvat.org](https://cvat.org)

[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).
This is an online demo with the latest version of the annotation tool.
Try it online without local installation. Only own or assigned tasks
are visible to users.

If you have any questions, please contact Onepanel directly at
[email protected]. If you are in the Onepanel application, you can also
use the chat icon in the bottom right corner.
Disabled features:
- [Analytics: management and monitoring of data annotation team](/components/analytics/README.md)
- [Support for NVIDIA GPUs](/components/cuda/README.md)

Limitations:
- No more than 10 tasks per user
- Uploaded data is limited to 500Mb

## REST API

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 66 additions & 24 deletions cvat/apps/documentation/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
- [Objects sidebar](#objects-sidebar)
- [Objects](#objects)
- [Labels](#labels)
- [Bottom side panel](#bottom-side-panel)
- [Fullscreen player mode](#fullscreen-player-mode)
- [Annotation mode (advanced)](#annotation-mode-advanced)
- [Interpolation mode (advanced)](#interpolation-mode-advanced)
- [Shape mode (advanced)](#shape-mode-advanced)
- [Track mode (advanced)](#track-mode-advanced)
- [Attribute annotation mode (advanced)](#attribute-annotation-mode-advanced)
- [Annotation with box by 4 points](#annotation-with-box-by-4-points)
- [Annotation with rectangle by 4 points](#annotation-with-rectangle-by-4-points)
- [Annotation with polygons](#annotation-with-polygons)
- [Annotation with polylines](#annotation-with-polylines)
- [Annotation with cuboids](#annotation-with-cuboids)
Expand Down Expand Up @@ -781,6 +779,41 @@ Switching between user interface modes.
![](static/documentation/images/image145.jpg)

---

### Controls sidebar

**Navigation block** - contains tools for moving and rotating images.
|Icon |Description |
|-- |-- |
|![](static/documentation/images/image148.jpg)|``Cursor`` (``Esc``)- a basic annotation pedacting tool. |
|![](static/documentation/images/image149.jpg)|``Move the image``- a tool for moving around the image without<br/> the possibility of editing.|
|![](static/documentation/images/image102.jpg)|``Rotate``- two buttons to rotate the current frame<br/> a clockwise (``Ctrl+R``) and anticlockwise (``Ctrl+Shift+R``).<br/> You can enable ``Rotate all images`` in the settings to rotate all the images in the job

**Zoom block** - contains tools for image zoom.
|Icon |Description |
|-- |-- |
|![](static/documentation/images/image151.jpg)|``Fit image``- fits image into the workspace size.<br/> Shortcut - double click on an image|
|![](static/documentation/images/image166.jpg)|``Select a region of interest``- zooms in on a selected region.<br/> You can use this tool to quickly zoom in on a specific part of the frame.|

**Shapes block** - contains all the tools for creating shapes.
|Icon |Description |Links to section |
|-- |-- |-- |
|![](static/documentation/images/image167.jpg)|``Rectangle``|[Shape mode](#shape-mode-basics); [Track mode](#track-mode-basics);<br/> [Drawing by 4 points](#annotation-with-box-by-4-points)|
|![](static/documentation/images/image168.jpg)|``Polygon`` |[Annotation with polygons](#annotation-with-polygons) |
|![](static/documentation/images/image169.jpg)|``Polyline`` |[Annotation with polylines](#annotation-with-polylines)|
|![](static/documentation/images/image170.jpg)|``Points`` |[Annotation with points](#annotation-with-points) |
|![](static/documentation/images/image176.jpg)|``Cuboid`` |[Annotation with cuboids](#annotation-with-cuboids) |
|![](static/documentation/images/image171.jpg)|``Tag`` |[Annotation with tag](#annotation-with-tag) |

**Edit block** - contains tools for editing tracks and shapes.
|Icon |Description |Links to section |
|-- |-- |-- |
|![](static/documentation/images/image172.jpg)|``Merge Shapes``(``M``) — starts/stops the merging shapes mode. |[Track mode (basics)](#track-mode-basics)|
|![](static/documentation/images/image173.jpg)|``Group Shapes`` (``G``) — starts/stops the grouping shapes mode.|[Shape grouping](#shape-grouping)|
|![](static/documentation/images/image174.jpg)|``Split`` — splits a track. |[Track mode (advanced)](#interpolation-mode-advanced)|

---

### Objects sidebar

``Hide`` - the button hides the object's sidebar.
Expand Down Expand Up @@ -932,7 +965,7 @@ Enables / disables the display of auxiliary perspective lines. Only relevant for

Basic operations in the mode were described in section [shape mode (basics)](#shape-mode-basics).

**Occluded**
**Occluded**
Occlusion is an attribute used if an object is occluded by another object or
isn't fully visible on the frame. Use ``Q`` shortcut to set the property
quickly.
Expand All @@ -951,51 +984,60 @@ by accident. Shortcut: ``L``.

![](static/documentation/images/image066.jpg)

## Interpolation mode (advanced)
## Track mode (advanced)

Basic operations in the mode were described above.
Basic operations in the mode were described in section [track mode (basics)](#track-mode-basics).

Bounding boxes that were created in the mode, have extra navigation buttons.
- These buttons help to jump to previous/next key frame.
Shapes that were created in the track mode, have extra navigation buttons.
- These buttons help to jump to the previous/next keyframe.

![](static/documentation/images/image056.jpg)

- The button helps to jump to initial frame for the object (first bounding box for the track).
- The button helps to jump to the initial frame and to the last keyframe.

![](static/documentation/images/image057.jpg)

You can use the `` Split '' function to split one track into two tracks:

![](static/documentation/images/gif010_DETRAC.gif)

## Attribute annotation mode (advanced)

Basic operations in the mode was described above.
Basic operations in the mode were described in section [attribute annotation mode (basics)](#attribute-annotation-mode-basics).

It is possible to handle lots of objects on the same frame in the mode.

![](static/documentation/images/image058.jpg)
![](static/documentation/images/image058_DETRAC.jpg)

It is more convenient to annotate objects of the same type. In this case you can apply
the appropriate filter. For example, the following filter will
hide all objects except person: ``label=="Person"``.

To navigate between objects (person in this case),
use the following buttons ``switch between objects in the frame`` on the special panel:

It is more convenient to annotate objects of the same type. You can specify
the appropriate filter in this case. For example, the following filter will
hide all objects except pedestrians: ``pedestrian``.
![](static/documentation/images/image026.jpg)

To navigate between objects (pedestrians in the case), use the following shortcuts:
or shortcuts:
- ``Tab`` — go to the next object
- ``Shift+Tab`` — go to the previous object.

By default, objects in the mode are zoomed. Check
``Open Menu`` —> ``Settings`` —> ``AAM Zoom Margin`` to adjust that.
In order to change the zoom level, go to settings (press ``F3``)
in the workspace tab and set the value Attribute annotation mode (AAM) zoom margin in px.

## Annotation with box by 4 points
## Annotation with rectangle by 4 points
It is an efficient method of bounding box annotation, proposed
[here](https://arxiv.org/pdf/1708.02750.pdf).
Before starting, you need to be sure that ``Box by 4 points`` is selected.
Before starting, you need to make sure that the drawing method by 4 points is selected.

![](static/documentation/images/image134.jpg)

Press ``N`` for entering drawing mode. Click exactly four extreme points:
Press ``Shape`` or ``Track`` for entering drawing mode. Click on four extreme points:
the top, bottom, left- and right-most physical points on the object.
Drawing is automatically completed right after clicking the fourth point.
Drawing will be automatically completed right after clicking the fourth point.
Press ``Esc`` to cancel editing.

![](static/documentation/images/gif016.gif)
![](static/documentation/images/gif016_mapillary_vistas.gif)

## Annotation with polygons

Expand Down
21 changes: 9 additions & 12 deletions cvat/apps/engine/media_extractors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 Intel Corporation
# Copyright (C) 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -304,10 +304,16 @@ def __init__(self, _):
self._output_fps = 25

@staticmethod
def _create_av_container(path, w, h, rate, pix_format, options):
def _create_av_container(path, w, h, rate, options):
# x264 requires width and height must be divisible by 2 for yuv420p
if h % 2:
h += 1
if w % 2:
w += 1

container = av.open(path, 'w')
video_stream = container.add_stream('libx264', rate=rate)
video_stream.pix_fmt = pix_format
video_stream.pix_fmt = "yuv420p"
video_stream.width = w
video_stream.height = h
video_stream.options = options
Expand All @@ -320,14 +326,12 @@ def save_as_chunk(self, images, chunk_path):

input_w = images[0][0].width
input_h = images[0][0].height
pix_format = images[0][0].format.name

output_container, output_v_stream = self._create_av_container(
path=chunk_path,
w=input_w,
h=input_h,
rate=self._output_fps,
pix_format=pix_format,
options={
"crf": str(self._image_quality),
"preset": "ultrafast",
Expand Down Expand Up @@ -373,18 +377,11 @@ def save_as_chunk(self, images, chunk_path):
output_h = input_h // downscale_factor
output_w = input_w // downscale_factor

# width and height must be divisible by 2
if output_h % 2:
output_h += 1
if output_w % 2:
output_w +=1

output_container, output_v_stream = self._create_av_container(
path=chunk_path,
w=output_w,
h=output_h,
rate=self._output_fps,
pix_format='yuv420p',
options={
'profile': 'baseline',
'coder': '0',
Expand Down
10 changes: 8 additions & 2 deletions cvat/apps/log_viewer/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import os

from revproxy.views import ProxyView
from cvat.apps.authentication.decorators import login_required
from django.utils.decorators import method_decorator
from django.conf import settings
from rules.contrib.views import PermissionRequiredMixin

from cvat.apps.authentication.decorators import login_required

@method_decorator(login_required, name='dispatch')
class LogViewerProxy(ProxyView):
class LogViewerProxy(PermissionRequiredMixin, ProxyView):
permission_required = settings.RESTRICTIONS['analytics_access']

upstream = 'http://{}:{}'.format(os.getenv('DJANGO_LOG_VIEWER_HOST'),
os.getenv('DJANGO_LOG_VIEWER_PORT'))
add_remote_user = True
Expand Down
18 changes: 13 additions & 5 deletions cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,19 @@ def generate_ssh_keys():
sys.path.append(DATUMARO_PATH)

RESTRICTIONS = {
"user_agreements": [],
'user_agreements': [],

# this setting limits the number of tasks for the user
"task_limit": None,

# this settings reduse task visibility to owner and assignee only
"reduce_task_visibility": False,
'task_limit': None,

# this setting reduse task visibility to owner and assignee only
'reduce_task_visibility': False,

# allow access to analytics component to users with the following roles
'analytics_access': (
'engine.role.observer',
'engine.role.annotator',
'engine.role.user',
'engine.role.admin',
),
}

0 comments on commit 051385c

Please sign in to comment.