diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7c0b591b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,29 @@ +* text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4 + +.git* text export-ignore + +*.txt text +*.htm text +*.html text +*.js text +*.py text +*.css text +*.md text +*.yml text +Dockerfile text +LICENSE text +*.conf text +*.mimetypes text +*.sh text eol=lf + +*.avi binary +*.bmp binary +*.exr binary +*.ico binary +*.jpeg binary +*.jpg binary +*.png binary +*.gif binary +*.ttf binary +*.pdf binary + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3776747..35615780 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,52 +2,3 @@ When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. - -## Development environment - -Next steps should work on clear Ubuntu 18.04. - -- Install necessary dependencies: - -```sh -$ sudo apt-get install -y curl redis-server python3-dev python3-pip python3-venv libldap2-dev libsasl2-dev -``` - -- Install [Visual Studio Code](https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions) for development - -- Install CVAT on your local host: - -```sh -$ git clone https://github.com/opencv/cvat -$ cd cvat && mkdir logs keys -$ python3 -m venv .env -$ . .env/bin/activate -$ pip install -U pip wheel -$ pip install -r cvat/requirements/development.txt -$ python manage.py migrate -$ python manage.py collectstatic -``` - -- Create a super user for CVAT: - -```sh -$ python manage.py createsuperuser -Username (leave blank to use 'django'): *** -Email address: *** -Password: *** -Password (again): *** -``` - -- Run Visual Studio Code from the virtual environment - -``` -$ code . -``` - -- Inside Visual Studio Code install [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) and [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extensions - -- Reload Visual Studio Code - -- Select `CVAT Debugging` configuration and start debugging (F5) - -You have done! Now it is possible to insert breakpoints and debug server and client of the tool. \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c649d0b4..8f4fa138 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -10,7 +10,7 @@ * Primary developer * Author and maintainer -- **[Andrey Zhavoronkov]()** +- **[Andrey Zhavoronkov](https://github.com/azhavoro)** * Developer * Author and maintainer @@ -18,8 +18,13 @@ # Contributors - **[Victor Salimonov](https://github.com/VikTorSalimonov)** + * Documentation, screencasts +- **[Dmitry Sidnev](https://github.com/DmitriySidnev)** + + * [convert_to_coco.py](utils/coco) - an utility for converting annotation from CVAT to COCO data annotation format + - **[Sebastián Yonekura](https://github.com/syonekura)** - * [convert_to_voc.py](cvat/utils/convert_to_voc.py) - an utility for - converting CVAT XML to PASCAL VOC data annotation format. \ No newline at end of file + + * [convert_to_voc.py](utils/voc) - an utility for converting CVAT XML to PASCAL VOC data annotation format. diff --git a/Dockerfile b/Dockerfile index c86e3ae0..fe2952a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,6 +87,7 @@ COPY supervisord.conf mod_wsgi.conf wait-for-it.sh manage.py ${HOME}/ RUN pip3 install --no-cache-dir -r /tmp/requirements/${DJANGO_CONFIGURATION}.txt COPY cvat/ ${HOME}/cvat COPY tests ${HOME}/tests +RUN patch -p1 < ${HOME}/cvat/apps/engine/static/engine/js/3rdparty.patch RUN chown -R ${USER}:${USER} . # RUN all commands below as 'django' user diff --git a/LICENSE b/LICENSE index 97c8a762..aae0a08e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2018 annotation - +Copyright (C) 2018 Intel Corporation + Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +SPDX-License-Identifier: MIT diff --git a/README.md b/README.md index 9ed6f778..63f26ee7 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,8 @@ Type your login/password for the superuser [on the login page](http://localhost: ### Stop all containers -The command below will stop and remove containers and networks created by `up`. See documentation for [docker-compose down](https://docs.docker.com/compose/reference/down/) for more details. +The command below will stop and remove containers, networks, volumes, and images +created by `up`. ```bash docker-compose down @@ -116,3 +117,26 @@ cvat: environment: DJANGO_LOG_SERVER_URL: https://annotation.example.com:5000 ``` + +### Share path + +You can use a share storage for data uploading during you are creating a task. To do that you can mount it to CVAT docker container. Example of docker-compose.override.yml for this purpose: + +```yml +version: "2.3" + +services: + cvat: + environment: + CVAT_SHARE_URL: "Mounted from /mnt/share host directory" + volumes: + cvat_share:/home/django/share:ro + +volumes: + cvat_share: + driver_opts: + type: none + device: /mnt/share + o: bind +``` +You can change the share device path to your actual share. For user convenience we have defined the enviroment variable $CVAT_SHARE_URL. This variable contains a text (url for example) which will be being shown in the client-share browser. diff --git a/cvat/__init__.py b/cvat/__init__.py index e69de29b..d8e62e54 100644 --- a/cvat/__init__.py +++ b/cvat/__init__.py @@ -0,0 +1,5 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + diff --git a/cvat/apps/authentication/__init__.py b/cvat/apps/authentication/__init__.py index b3d5c6b0..a7b92720 100644 --- a/cvat/apps/authentication/__init__.py +++ b/cvat/apps/authentication/__init__.py @@ -1 +1,7 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + default_app_config = 'cvat.apps.authentication.apps.AuthenticationConfig' + diff --git a/cvat/apps/authentication/admin.py b/cvat/apps/authentication/admin.py index 8c38f3f3..af8dfc47 100644 --- a/cvat/apps/authentication/admin.py +++ b/cvat/apps/authentication/admin.py @@ -1,3 +1,9 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.contrib import admin # Register your models here. + diff --git a/cvat/apps/authentication/apps.py b/cvat/apps/authentication/apps.py index f742de04..c0e41e42 100644 --- a/cvat/apps/authentication/apps.py +++ b/cvat/apps/authentication/apps.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.apps import AppConfig from django.db.models.signals import post_migrate, post_save from .settings.authentication import DJANGO_AUTH_TYPE diff --git a/cvat/apps/authentication/decorators.py b/cvat/apps/authentication/decorators.py index 1e3d4918..3ef9d263 100644 --- a/cvat/apps/authentication/decorators.py +++ b/cvat/apps/authentication/decorators.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.contrib.auth import REDIRECT_FIELD_NAME from django.shortcuts import resolve_url, reverse from django.http import JsonResponse diff --git a/cvat/apps/authentication/forms.py b/cvat/apps/authentication/forms.py index 9b6ab877..238b1598 100644 --- a/cvat/apps/authentication/forms.py +++ b/cvat/apps/authentication/forms.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.contrib.auth.forms import ( UsernameField, AuthenticationForm, diff --git a/cvat/apps/authentication/migrations/__init__.py b/cvat/apps/authentication/migrations/__init__.py index e69de29b..d8e62e54 100644 --- a/cvat/apps/authentication/migrations/__init__.py +++ b/cvat/apps/authentication/migrations/__init__.py @@ -0,0 +1,5 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + diff --git a/cvat/apps/authentication/models.py b/cvat/apps/authentication/models.py index 71a83623..cdf3b082 100644 --- a/cvat/apps/authentication/models.py +++ b/cvat/apps/authentication/models.py @@ -1,3 +1,9 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.db import models # Create your models here. + diff --git a/cvat/apps/authentication/settings/__init__.py b/cvat/apps/authentication/settings/__init__.py index e69de29b..d8e62e54 100644 --- a/cvat/apps/authentication/settings/__init__.py +++ b/cvat/apps/authentication/settings/__init__.py @@ -0,0 +1,5 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + diff --git a/cvat/apps/authentication/settings/auth_ldap.py b/cvat/apps/authentication/settings/auth_ldap.py index 1abc5ac1..01021060 100644 --- a/cvat/apps/authentication/settings/auth_ldap.py +++ b/cvat/apps/authentication/settings/auth_ldap.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.conf import settings import ldap from django_auth_ldap.config import LDAPSearch, NestedActiveDirectoryGroupType diff --git a/cvat/apps/authentication/settings/auth_simple.py b/cvat/apps/authentication/settings/auth_simple.py index dcd04277..41a18c98 100644 --- a/cvat/apps/authentication/settings/auth_simple.py +++ b/cvat/apps/authentication/settings/auth_simple.py @@ -1,2 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + # Specify groups that new users will have AUTH_SIMPLE_DEFAULT_GROUPS = [] + diff --git a/cvat/apps/authentication/settings/authentication.py b/cvat/apps/authentication/settings/authentication.py index 2cb9d470..3948d0ee 100644 --- a/cvat/apps/authentication/settings/authentication.py +++ b/cvat/apps/authentication/settings/authentication.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.conf import settings import os diff --git a/cvat/apps/authentication/signals.py b/cvat/apps/authentication/signals.py index 3a30ac20..2dfc89dc 100644 --- a/cvat/apps/authentication/signals.py +++ b/cvat/apps/authentication/signals.py @@ -1,3 +1,8 @@ + +# Copyright (C) 2018 Intel Corporation +# +# SPDX-License-Identifier: MIT + from django.db import models from django.conf import settings diff --git a/cvat/apps/authentication/templates/403.html b/cvat/apps/authentication/templates/403.html index daaa6181..e275bb1f 100644 --- a/cvat/apps/authentication/templates/403.html +++ b/cvat/apps/authentication/templates/403.html @@ -1,3 +1,8 @@ + {% extends "auth_base.html" %} {% block title %}Forbidden{% endblock %} diff --git a/cvat/apps/authentication/templates/login.html b/cvat/apps/authentication/templates/login.html index d039bcb6..128a8ccb 100644 --- a/cvat/apps/authentication/templates/login.html +++ b/cvat/apps/authentication/templates/login.html @@ -1,3 +1,8 @@ + {% extends "auth_base.html" %} {% block title %}Login{% endblock %} diff --git a/cvat/apps/authentication/templates/login_ldap.html b/cvat/apps/authentication/templates/login_ldap.html index ba892022..8cba181d 100644 --- a/cvat/apps/authentication/templates/login_ldap.html +++ b/cvat/apps/authentication/templates/login_ldap.html @@ -1,3 +1,8 @@ + {% extends "auth_base.html" %} {% block title %}Login{% endblock %} diff --git a/cvat/apps/authentication/templates/note.html b/cvat/apps/authentication/templates/note.html index 2791447d..ba2fea92 100644 --- a/cvat/apps/authentication/templates/note.html +++ b/cvat/apps/authentication/templates/note.html @@ -1,2 +1,7 @@ +
\ No newline at end of file diff --git a/cvat/apps/authentication/templates/register.html b/cvat/apps/authentication/templates/register.html index aa0793b8..b655e221 100644 --- a/cvat/apps/authentication/templates/register.html +++ b/cvat/apps/authentication/templates/register.html @@ -1,3 +1,8 @@ + {% extends "auth_base.html" %} {% block title %}Create user{% endblock %} diff --git a/cvat/apps/authentication/templates/user_profile.html b/cvat/apps/authentication/templates/user_profile.html index 82f9c231..37ea7d49 100644 --- a/cvat/apps/authentication/templates/user_profile.html +++ b/cvat/apps/authentication/templates/user_profile.html @@ -1,3 +1,8 @@ +
|
+ |
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+