AI powered Spendenraid evaluation.
- With ❤️ by TheShad0w
This AI helps with the evaluations of donations during the pr0gramm "Spendenraid". It classifies pictures to see what organisation the donation was for, as well as the amount of money donated.
The AI operates multithreaded and asynchronous. It receives a "batch" of image ID's which are processed one after the other in a "queue" (image download, organisation classification, donation amount evaluation, image deletion, sending the result to the server). One worker thread is opened per batch. Batches can arrive in parallel, i.e. if one batch is currently being processed, another one can arrive at the same time. These are then processed independently of each other. It is recommended to deploy the whole project with PM2 in Cluster Mode with about 5 instances, so that another OSI-layer 7 horizontal scaling takes place. A ready-made configuration file is available in the repository.
To learn how the AI was trained, please refer to the explanation in the classification script.
- Open up your favourite terminal (and navigate somewhere you want to download the repository to).
- Make sure you have NodeJS installed. Test by entering
$node -v
If this returns a version number, NodeJS is installed. If not, get NodeJS here. - Clone the repository and navigate to it. If you have Git installed, type
$git clone https://github.com/NullDev/Spendenr-AI-d.git && cd Spendenr-AI-d
If not, download it here and extract the ZIP file.
Then navigate to the folder. - Install all dependencies by typing
$npm install
- Copy config.template.json and paste it as
config.js
- Configure it in your favourite editor by editing
config.json
- Start it by running
$npm start
or lint and start it by using
$npm run dev
Attention: Additionally required modules besides NPM Dependencies:
- Docker (Install instructions)
- Tesseract (
sudo apt install tesseract-ocr tesseract-ocr tesseract-ocr-deu
) - Python 3.8.10 (Install instructions (replace 3.8.2 with 3.8.10 !))
- Tensorflow 2.4.0 (
pip install tensorflow==2.4.0
)
- RundesBalli for his Spendenraid System
- Chiaki for help with refactoring the classification python script