https://github.com/nulldev/spendenr-ai-d
💸 AI powered Spendenraid evaluation.
https://github.com/nulldev/spendenr-ai-d
classification evaluation nodejs nulldev ocr pr0gramm python
Last synced: 6 months ago
JSON representation
💸 AI powered Spendenraid evaluation.
- Host: GitHub
- URL: https://github.com/nulldev/spendenr-ai-d
- Owner: NullDev
- License: agpl-3.0
- Created: 2022-03-23T06:19:36.000Z (almost 4 years ago)
- Default Branch: ocr-only
- Last Pushed: 2025-03-27T23:18:51.000Z (10 months ago)
- Last Synced: 2025-07-11T15:22:41.818Z (7 months ago)
- Topics: classification, evaluation, nodejs, nulldev, ocr, pr0gramm, python
- Language: JavaScript
- Homepage:
- Size: 76 MB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spendenr-AI-d

AI powered Spendenraid evaluation.
- With :heart: by TheShad0w
## :question: What does it do?
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.
## :information_source: Update
New version is OCR only.
Old ReadMe Below ⬇️ (or [go to master branch](https://github.com/NullDev/Spendenr-AI-d/tree/master))
## :information_source: Info
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](https://pm2.io/) in [Cluster Mode](https://pm2.keymetrics.io/docs/usage/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]((https://github.com/NullDev/Spendenr-AI-d/blob/master/pm2-service.config.json)).
To learn how the AI was trained, please refer [to the explanation in the classification script](https://github.com/NullDev/Spendenr-AI-d/blob/master/model/tag.py#L18-L27).
## :wrench: Setup
0. Open up your favourite terminal (and navigate somewhere you want to download the repository to).
1. 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.
2. 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.
3. Install all dependencies by typing
$ `npm install`
4. Copy [config.template.json](https://github.com/NullDev/Spendenr-AI-d/blob/master/config.template.json) and paste it as `config.js`
5. Configure it in your favourite editor by editing `config.json`
6. 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](https://docs.docker.com/engine/install/debian/#install-using-the-repository))
- Tesseract (`sudo apt install tesseract-ocr tesseract-ocr tesseract-ocr-deu`)
- Python 3.8.10 ([Install instructions](https://stackoverflow.com/a/62831268/7575111) (replace 3.8.2 with 3.8.10 !))
- Tensorflow 2.4.0 (`pip install tensorflow==2.4.0`)
## :heart: Acknowledgements
- [RundesBalli](https://github.com/RundesBalli) for his [Spendenraid System](https://github.com/RundesBalli/pr0gramm-Spendenraid)
- [Chiaki](https://pr0gramm.com/user/Chiaki) for [help with refactoring the classification python script](https://github.com/NullDev/Spendenr-AI-d/blob/master/model/tag.py)