Skip to content

Latest commit

 

History

History
195 lines (170 loc) · 6.57 KB

File metadata and controls

195 lines (170 loc) · 6.57 KB

Aikon logo AIKON

Install 🛠️

Requirements

  • Sudo privileges
  • Bash terminal
  • Python >= 3.10
  • Java 11: instructions for Linux install
    • Download OpenJDK (open source version of Java)
    • Download the latest RPM Package
    • sudo alien -i jdk-11.0.17_linux-aarch64_bin.rpm
    • java -version => openjdk 11.x.x // java version "1.11.x"
  • Git:
  • Geonames:
    • Create an account on Geonames and activate it

NOTE: AIKON requires MongoDB and Redis and will install them if needed. User accounts and passwords are NOT SUPPORTED on Redis and MongoDB and should not be used with AIKON.

git clone git@github.com:Aikon-platform/aikon.git
cd aikon

Scripted install 🐆

If you are using a Linux or Mac distribution, you can install the app with the following script:

bash scripts/setup.sh

Otherwise, follow the instructions below.

Manual install 🐢

Dependencies

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt-get install wget ca-certificates
sudo apt install python3-venv python3-dev libpq-dev nginx curl maven postgresql poppler-utils redis-server ghostscript

Python environment

python3.10 -m venv venv
source venv/bin/activate
pip install -r app/requirements-dev.txt

Enable pre-commit hooks (auto-test and formatting)

pre-commit install

Project settings

Create a Geonames account and activate it.

Copy the content of the settings template file

cp app/config/.env{.template,}

Change variables in the generated file app/config/.env to corresponds to your database and username

Create a Geonames account, activate it and change <geonames-username> in the .env file

Database

Open Postgres command prompt, create a database (<database>) and a user

sudo -i -u postgres psql # Mac: psql postgres
postgres=# CREATE DATABASE <database>;
postgres=# CREATE USER <username> WITH PASSWORD '<password>';
postgres=# ALTER ROLE <username> SET client_encoding TO 'utf8';
postgres=# ALTER DATABASE <database> OWNER TO <username>;
postgres=# ALTER ROLE <username> SET default_transaction_isolation TO 'read committed';
postgres=# ALTER ROLE <username> SET timezone TO 'UTC';
postgres=# GRANT ALL PRIVILEGES ON DATABASE <database> TO <username>;
postgres=# \q

Update database schema with models that are stored inside app/webapp/migrations

python app/manage.py migrate

Create a superuser

python app/manage.py createsuperuser

Cantaloupe

Create a .ENV file for cantaloupe

sudo chmod +x cantaloupe/init.sh && cp cantaloupe/.env{.template,} && nano cantaloupe/.env

Change variables in the generated file cantaloupe/.env:

  • CANTALOUPE_BASE_URI: leave it blank on local
  • CANTALOUPE_IMG depends on the folder in which you run cantaloupe (inside cantaloupe/ folder: ../app/mediafiles/img/)
CANTALOUPE_BASE_URI=
CANTALOUPE_IMG=absolute/path/to/app/mediafiles/img/  # inside the project directory
CANTALOUPE_PORT=8182
CANTALOUPE_PORT_HTTPS=8183
CANTALOUPE_DIR=/dir/where/cantaloupe/logs/will/be/stored

Set up Cantaloupe by running (it will create a cantaloupe.properties file with your variables):

bash cantaloupe/init.sh

Run Cantaloupe

bash cantaloupe/start.sh

Simple Annotation Server

Run Simple Annotation Server

cd sas && mvn jetty:run

Navigate to http://localhost:8888/index.html to start annotating: You should now see Mirador with default example manifests.

Connection to API 📡

API code and instructions can be found in this repository.

Launch app 🚀

Launch everything (Django, Celery, Cantaloupe and SimpleAnnotationServer) at once (stop with Ctrl+C):

bash run.sh

You can now visit the app at http://localhost:8000 and connect with the credentials you created

For more documentation, see docs folder

Testing 🧪

bash ru.sh -t

Project 📜

Aikon is a modular research platform designed to empower humanities scholars in leveraging artificial intelligence and computer vision methods for analyzing large-scale heritage collections. It offers a user-friendly interface for visualizing, extracting, and analyzing illustrations from historical documents, fostering interdisciplinary collaboration and sustainability across digital humanities projects. Built on proven technologies and interoperable formats, Aikon's adaptable architecture supports all projects involving visual materials.

Aikon is funded and supported by the Agence Nationale pour la Recherche and the European Research Council

  • VHS ANR-21-CE38-0008: computer Vision and Historical analysis of Scientific illustration circulation
  • EiDA ANR-22-CE38-0014: EdIter et analyser les Diagrammes astronomiques historiques avec l’intelligence Artificielle
  • DISCOVER project ERC-101076028: Discovering and Analyzing Visual Structures
@misc{albouy2024aikon,
    title={AIKON: a computer vision platform for the Digital Humanities},
    author={
        Ségolène Albouy,
        Jade Norindr,
        Fouad Aouinti,
        Clara Grometto,
        Robin Champenois,
        Alexandre Guilbaud,
        Stavros Lazaris,
        Matthieu Husson,
        Mathieu Aubry
    },
    url={https://github.com/Aikon-platform/aikon},
    year={2024}
}