Skip to content

MartinMa28/Auto-Labeling-Django-Server

Repository files navigation

Auto-Labeling-Django-Server

LICENSE

Code released under the MIT License.

OpenCV CVAT

This project is based on OpenCV CVAT. For more details, please check out their repo page.

Install Docker CE or Docker EE from official site

Please read official manual here.

Install docker-compose (1.19.0 or newer)

sudo pip install docker-compose

Build docker images

To build all necessary docker images run docker-compose build command. By default, in production mode the tool uses PostgreSQL as database, Redis for caching.

Run containers

To start all containers run docker-compose up -d command. Go to localhost:8080. You should see a login page.

Create superuser account

You can register a user but by default it will not have rights even to view list of tasks. Thus you should create a superuser. The superuser can use admin panel to assign correct groups to the user. Please use the command below:

docker exec -it cvat sh -c '/usr/bin/python3 ~/manage.py createsuperuser'

Advanced settings

If you want to access you instance of CVAT outside of your localhost you should specify ALLOWED_HOSTS environment variable. The best way to do that is to create docker-compose.override.yml and put all your extra settings here.

version: "2.3"

services:
  cvat:
    environment:
      ALLOWED_HOSTS: .example.com
    ports:
      - "80:8080"

Project structure

/jupyter_notebooks -- all of notebooks and previous PyTorch models
/cvat -- main project folder
--/apps -- applications
----/engine -- the most important application, including task management, annotation and prediction (inference)
------/views.py -- Django View functions
------/urls.py -- engine's application API routes
------/static/engine/js/base.js -- JavaScript functions used in /js/annoatationUI.js
------/static/engine/js/annotationUI.js -- top level codes, like DOM event listeners

----/index -- the dashboard (the home page)
----/molview -- molecule 3D viewer, which is not close related to auto-labeling, though
----/dashboard -- the original dashboard, which is quite handy when developing

--/urls.py -- project API routes
--/requirements -- python packages generated by pip3 freeze, also used to install packages in Dockerfile
--/settings -- Django settings