This is the repository for the component which serves the front-end web-based annotation interface and manages the back-end DB in our HInDoLA system.
The first step is to setup the backend database. Download MYSQL from https://www.mysql.com/downloads/
Set up with a Username and Password and use the same credentials in the app.py file in the Annotation_App folder. Create a database using the MYSQL command line and also set it as the database name in the app.py.
In the Annotation_App, go to myproject, in the templates folder, go to annotationtool.html file:
- Comment line number 1343 and in the line 1342 give the address with the port number where you want to run the app.
- Repeat the same step for line number for 8633 and 8632.
-
If you have the .sql file containing all the information then use the following command to connect to your database:
mysql -u localusername -p local databasename < yourfilename.sql
-
If there is another database serving a remote website the nuse the following commands:
mysqldump -u remoteusername -p -h your.site.com localdatabasename > dump.sql
mysql -u localusername -p local databasename < dump.sql
- Download the repository and install the prerequisites mentioned in Annotation_App/requirements.txt
- Go to the Annotation_App folder and locate app.py
- Change the host to "127.0.0.1" and the portnumber to whatever was set in the annotationtool.html file at the end of the app.py file.
- Run
python3 app.py
The Annotation App is to manage the manuscripts annotations through an interactive GUI. Implemented in Flask, the App has useful features to annotate images from large manuscripts libraries.
- Open the page at the started local server
- Sign-up and login
- Request image through "Request" Button
- Annotate with the regions provided - Freehand (single click to start and double click to finish), Polygon(Single click to start, each click adds new vertex and double click to finish)
- "Done" button to save the annotations, "Skip" button to skip the image
- Normal Mode - https://tinyurl.com/hindola-v1-annotator
- Correction Mode - https://tinyurl.com/hindola-v1-annotator-corr