Annotation tool for videos
Requirements. You'll need the following installed on your system:
- Python 3
npm
- PostgreSQL or MySQL
On Ubuntu you can install them as follows:
sudo apt-get install python3-dev
sudo apt-get install npm
sudo apt-get install postgresql postgresql-client postgresql-contrib
sudo apt-get install libpq-dev
Install the Python dependencies:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Install the JavaScript dependencies:
npm install
Create the database (Postegres):
# Create a new user
sudo -u postgres createuser -s annotator
# Create a new database
createdb -U annotator annotations_db
# Set the URL to the database as a system variable
export DATABASE_URL="postgresql://annotator@localhost/annotations_db"
Create the database (MySQL):
mysql -u root -h localhost -p
From MySQL console:
# Create a new user
CREATE USER 'elisabeta'@'localhost' IDENTIFIED BY 'ann123'
# Create a new database
CREATE DATABASE annotations_db;
# Grant privileges:
GRANT ALL PRIVILEGES ON annotations_db_lnd.* TO elisabeta@localhost IDENTIFIED BY 'ann123';
From command line:
# Set the URL to the database as a system variable
export DATABASE_URL="mysql+pymysql://elisabeta:ann123@localhost/annotations_db";
export DATABASE_URL="mysql+pymysql://elisabeta:ann123@localhost/annotations_db_lnd";
Create the tables from Python:
python models.py --todo create init
You can connect to the database as follows:
# Postgres
psql -h localhost -p 5432 -d annotations_db -U annotator
# MySQL
mysql -h localhost -u elisabeta -p annotations_db
Start the server:
python main.py
IMAR (needs to be root):
su
iptables -I INPUT -p tcp --dport 5153 -j ACCEPT
The webpage is accesible on the localhost http://0.0.0.0:5152.
- List videos in index page
- On click change video to be displayed
- List current annotations
- Add new annotations
- When adding a new annotation, automatically trim length of description
- Add scroll to annotations
- Reset controls when selecting another video
- Check Chrome
- Check why first option does not work in the select form
- Initialize select form with existing tags
- Fix time limits to either seconds or frames
- After adjusting start time, gray out the slider and the pick start button + text input (Maybe add a button - 'Done'?!)
- Select temporal limits in stages
- Add a button to pick the current time
- Are we storing frames or seconds as temporal limits? Python / MySQL expect frames; Javascript returns seconds
- Add a button to play the current selection
- Write "update annotation" on button when updatting
- Put a constraint on the time limits to ensure that the end limit is always after the start one
- Don't delete anything from database, add an extra entry in the table that specify it should be ignored
- Make the video larger
- Add a "Visualize All Annotations" button
- Replace videojs-playlist-ui with our own implementation