How To Install CVAT on Mac

Post image

I recently started learning about ML and detecting objects in pictures and videos. The first task you will have to do is image annotation before you can train your first custom model.

CVAT is a free, online, interactive video and image annotation tool for computer vision that I used to do annotation. As the online free version has limitations, I decided to install a local instance on my Macbook Air M1.

Install Dependencies

Install Docker for Mac

Download Docker for Mac.

undefined

Double-click Docker.dmg to open the installer, then drag Moby the whale to the Applications folder.

undefined

Double-click Docker.app in the Applications folder to start Docker. More instructions can be found here.

Install Git for Mac

There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time.

1
git --version

If you don’t have it installed already, it will prompt you to install it.

undefined

More instructions can be found here.

Install Google Chrome

Download and install Google Chrome. It is the only browser which is supported by CVAT.

undefined

Double-click Docker.dmg to open the installer, then drag Moby the whale to the Applications folder.

undefined

Install and Setup CVAT

Install CVAT

Open a terminal window. The terminal app is in the Utilities folder in Applications. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command - spacebar to launch Spotlight and type “Terminal,” then double-click the search result.

Clone CVAT source code from the GitHub repository with Git.

The following command will clone the latest develop branch:

1
2
git clone https://github.com/opencv/cvat
cd cvat

Run docker containers. It will take some time to download the latest CVAT release and other required images like postgres, redis, etc. from DockerHub and create containers.

1
docker compose up -d

Setup CVAT

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

1
docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'

Choose a username and a password for your admin account. For more information please read Django documentation.

Open the installed Google Chrome browser and go to localhost:8080. Type your login/password for the superuser on the login page and press the Login button. Now you should be able to create a new annotation task. Please read the CVAT manual for more details.

You May Also Like