How to Install Python Video Annotator

This article was automatically translated from Japanese using AI. The Japanese version is the authoritative version.

What is Python Video Annotator?

Python Video Annotator is an application that lets you analyze recorded videos and annotate events within them along a timeline.

Researchers in neuroscience and ethology can use it to record videos of animals and then analyze and quantify their behavior.
For example, suppose you are recording mouse behavior and want to score events such as tongue extension, tail flicks, or ear movements.
When does each event occur in the video, and how long does it last?
Watching the video and logging everything in Excel each time quickly becomes overwhelming when you have defined many behaviors.
With a tool like this, you can annotate the video directly and export the timing and event information.

There used to be an open-source application for scoring animal behavior called VCode.
The problem, however, is that it no longer runs on current computer operating systems.

Python Video Annotator runs on modern PCs, retains the features you need, and can additionally be combined with external sensor data (such as pressure gauges) and behavior quantification tools like DeepLabCut, making it a very useful tool for researchers.

How to install

The official site describes the installation procedure in detail, but I could not get it to install properly on my machine. (Installing it directly may have caused conflicts with packages already present on my system.)
So instead I followed the approach described on the GitHub page: building a virtual environment with Anaconda and installing there.

It sounds complicated when written out, but the steps are actually very simple.
As of now (October 20, 2021) it does not appear to support the latest macOS (Big Sur 11.6), though this will likely be fixed soon.
For that reason, I will use Windows as the example here.

That said, once you have installed Anaconda on macOS and can use the conda command, the steps are essentially the same, so please refer to this guide once support arrives. (For details, see my previous post.)

Install Anaconda and open the Anaconda Prompt.
Then create a virtual environment and activate it.

conda create -n videoannotator python=3.6
conda activate videoannotator

Next, install the required packages.

pip install opencv-python-headless pyqt5==5.14.1 pyqtwebengine==5.14.0

Then install Python Video Annotator.

pip install python-video-annotator

Once the various processes finish, the installation is complete.

To launch it, activate the virtual environment first, then run the command.

conda activate videoannotator
start-video-annotator

If the software starts up, you are all set.

Previous
Next