Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d484977
step 0.1
maartenjv Nov 29, 2024
f883233
added route to ml-frontend
maartenjv Dec 3, 2024
2b91106
upload cali sets and test retrieval
maartenjv Dec 4, 2024
71c0862
implemented the managed dataset code tests
maartenjv Dec 20, 2024
052520f
frontend inf change
maartenjv Feb 24, 2025
ec17b0e
Overstap naar nieuwe branch
dansil03 May 28, 2025
3cf47d9
Active Learning functionaliteiten toegevoegd
dansil03 Jun 6, 2025
af44460
frontend changes
dansil03 Jul 9, 2025
ceb8c22
Fix training form payload format in scheduler
dansil03 Jul 11, 2025
dfec60c
Add Active Learning Integration (BADGE strategy) to CHIMP System (#50)
Blazoned Aug 28, 2025
6851228
fix to active learning step to model retraining plugin, plus bug fixes
maartenjv Aug 28, 2025
75a6c9c
step 0.1
maartenjv Nov 29, 2024
e721ec2
added route to ml-frontend
maartenjv Dec 3, 2024
b32a358
upload cali sets and test retrieval
maartenjv Dec 4, 2024
be7e505
implemented the managed dataset code tests
maartenjv Dec 20, 2024
78c1342
frontend inf change
maartenjv Feb 24, 2025
1879ada
Overstap naar nieuwe branch
dansil03 May 28, 2025
2a864de
Active Learning functionaliteiten toegevoegd
dansil03 Jun 6, 2025
2c3aca7
frontend changes
dansil03 Jul 9, 2025
4a303fe
Fix training form payload format in scheduler
dansil03 Jul 11, 2025
b0c6d0c
fix to active learning step to model retraining plugin, plus bug fixes
maartenjv Aug 28, 2025
f84c85f
Merge branch 'data_versioning_tests' of https://github.com/Research-C…
maartenjv Aug 28, 2025
8760a4c
small changes before merge
maartenjv Aug 29, 2025
9a7733e
Update .gitignore
Blazoned Aug 29, 2025
b7e63d8
Delete logs/ml-frontend.logs
Blazoned Aug 29, 2025
211cfec
Create .gitkeep
Blazoned Aug 29, 2025
b1eeba1
Update launch.json
Blazoned Aug 29, 2025
1bf5115
Delete test_managed_dataset.py
Blazoned Aug 29, 2025
a495dcd
Delete upload_calibration_sets.ipynb
Blazoned Aug 29, 2025
7d73943
some fixes to the init script and a bugfix in model.py of emorec
maartenjv Aug 29, 2025
8839029
Reintroducing split requirements
Blazoned Aug 29, 2025
b20cf70
Merge branch 'data_versioning_tests' of https://github.com/Research-C…
maartenjv Aug 29, 2025
2bb3c3c
Merge branch 'data_versioning_tests' of https://github.com/Research-C…
maartenjv Aug 29, 2025
b991403
Removed [extra] from constraint file
Blazoned Sep 1, 2025
cffd293
Constraint file numpy version change
Blazoned Sep 1, 2025
c30f7e4
Changes to readme
LegeDoos Sep 1, 2025
eb686fb
Merge branch 'data_versioning_tests' into robinstalltest
LegeDoos Sep 1, 2025
872131e
Removed docker compose version as it is deprecated
LegeDoos Sep 1, 2025
3189631
Added requirements to init
LegeDoos Sep 2, 2025
6df1474
Clean outputs from init script
LegeDoos Sep 2, 2025
fc8ccd5
Cleanup readme
LegeDoos Sep 2, 2025
d0cc8c8
Add user rob to frontend.
LegeDoos Sep 4, 2025
067a75a
Fix input shape check for color images in EmotionModelCalibrator (bu…
LegeDoos Sep 9, 2025
3af2778
Update numpy version to 1.26.4 in constraints.txt
LegeDoos Sep 9, 2025
e33ddc7
Fix formatting issues in EmotionModelCalibrator to improve code reada…
LegeDoos Sep 9, 2025
2d7e95f
step 0.1
maartenjv Nov 29, 2024
34d7c5a
added route to ml-frontend
maartenjv Dec 3, 2024
b530e87
implemented the managed dataset code tests
maartenjv Dec 20, 2024
f4315e3
Overstap naar nieuwe branch
dansil03 May 28, 2025
a27d32f
Active Learning functionaliteiten toegevoegd
dansil03 Jun 6, 2025
ab690b2
frontend changes
dansil03 Jul 9, 2025
d529c96
Fix training form payload format in scheduler
dansil03 Jul 11, 2025
7ef7176
fix to active learning step to model retraining plugin, plus bug fixes
maartenjv Aug 28, 2025
ab06d98
small changes before merge
maartenjv Aug 29, 2025
6fe7653
Update .gitignore
Blazoned Aug 29, 2025
c9b5cdf
Delete logs/ml-frontend.logs
Blazoned Aug 29, 2025
598460e
Create .gitkeep
Blazoned Aug 29, 2025
783b425
Update launch.json
Blazoned Aug 29, 2025
b09f0ae
some fixes to the init script and a bugfix in model.py of emorec
maartenjv Aug 29, 2025
1630508
Delete test_managed_dataset.py
Blazoned Aug 29, 2025
449190c
Delete upload_calibration_sets.ipynb
Blazoned Aug 29, 2025
408465c
Reintroducing split requirements
Blazoned Aug 29, 2025
bbe032a
Changes to readme
LegeDoos Sep 1, 2025
7cd6e3c
Removed [extra] from constraint file
Blazoned Sep 1, 2025
a438e9e
Constraint file numpy version change
Blazoned Sep 1, 2025
25f25a1
Removed docker compose version as it is deprecated
LegeDoos Sep 1, 2025
94f08bc
Added requirements to init
LegeDoos Sep 2, 2025
02bca1e
Clean outputs from init script
LegeDoos Sep 2, 2025
4cab3be
Cleanup readme
LegeDoos Sep 2, 2025
af2763a
Add user rob to frontend.
LegeDoos Sep 4, 2025
a1c261c
Fix input shape check for color images in EmotionModelCalibrator (bu…
LegeDoos Sep 9, 2025
f9558cf
Update numpy version to 1.26.4 in constraints.txt
LegeDoos Sep 9, 2025
a8d0dc1
Fix formatting issues in EmotionModelCalibrator to improve code reada…
LegeDoos Sep 9, 2025
5cf35a7
Merge branch 'data_versioning_tests' of https://github.com/Research-C…
LegeDoos Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ MESSAGE_BROKER="localhost"
DATASTORE_ACCESS_KEY="yZmhrURuUhaeVSUagMRa"
DATASTORE_SECRET_KEY="cnk0OxGuIgVx4La0prNaWUv7JpriCnxZfq2417ba"

DATABASE_URI="localhost"
DATABASE_NAME="chimp_database"
DATABASE_USER="chimp_user"
DATABASE_PASSWORD="chimp_password"

REDIS_HOST="localhost"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Custom ignores
logs/*
!logs/.gitkeep
docker-data/monitoring/mlruns/
docker-data/monitoring/mlflow.db
docker-data/datastore/*
docker-data/postgres/*
docker-data/files/*
experimentation/
ml-frontend/logs
serving/mlruns
Expand All @@ -25,6 +29,7 @@ training/app/plugins/*
!training/app/plugins/example2.py
!training/app/plugins/game_art_style_detector
!training/app/plugins/emotion_recognition
!training/app/plugins/active_learning
training/datasets/*

### Generic ignores
Expand Down
42 changes: 10 additions & 32 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,19 @@
// TODO: Update launch profiles to allow local debugging when necessary. The to-do can be part a larger refactoring effort.
{
"version": "0.2.0",
"configurations": [
{
"name": "Experimentation",
"name": "Debug Celery Worker",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/experimentation/main.py",
"program": "celery", // Adjust this path to your virtual environment
"args": [
"-A", "manage:celery_app",
"worker",
"--pool=solo"
],
"console": "integratedTerminal",
"python": "${workspaceFolder}/experimentation/env/Scripts/python",
"cwd": "${workspaceFolder}/experimentation",
"gevent": true,
},
{
"name": "Serving",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/serving/main.py",
"console": "integratedTerminal",
"python": "${workspaceFolder}/serving/env/Scripts/python",
"cwd": "${workspaceFolder}/serving",
"gevent": true,
},
{
"name": "ML-Frontend",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/ml-frontend/main.py",
"console": "integratedTerminal",
"python": "${workspaceFolder}/ml-frontend/env/Scripts/python",
"cwd": "${workspaceFolder}/ml-frontend",
"gevent": true,
},
],
"compounds": [
{
"name": "Run all",
"configurations": ["Experimentation", "Serving", "ML-Frontend"]
"justMyCode": false,
}
]
}
}
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,11 @@ graph RL
## Development setup

1. Fork this repository and clone the fork to your local machine.
2. Install Docker and Docker Compose.
3. [OPTIONAL] Download the docker-data.zip [here](https://drive.google.com/file/d/1ILWH1V4SOSCMbYuRBi4xylDAPRm3WG0B/view?usp=sharing) and extract it into the docker-data folder
4. Run `docker-compose up` in the root of the repository
- On some systems you need to run `docker-compose --profile '' up` instead to run the default profile
5. Open your browser and navigate to the datastore dashboard on `http://localhost:9001`
6. On the datastore dashboard, go to "Access Keys" and click on "Create access key"
7. Add the access key and secret key created here to the `.env` file in the root of the CHIMP project
8. Open your browser and navigate to `http://localhost:5252`
9. Allow the CHIMP front-end to use your webcam.
10. Click on browse and select the calibration-data.zip (which can be downloaded on Teams).
11. Click on "Train New Model" and wait for the training to finish.
- You can monitor the training progress in the terminal by running `docker logs -f experimentation-server`.
12. Once the training is finished, navigate to `http://localhost:8999` (MLFlow).
13. Click on "Models" and select "onnx emotion model".
14. Click on the last model and set the model to "Production" by changing the "stage" setting at the top of the screen.
- [OPTIONAL] Click on the second to last model and sit the model to "Staging" by changing the "stage" setting at the top of the screen.
15. Refresh the CHIMP front-end. You should now see percentages of the detected emotions.
2. Install Docker and Docker Compose. Use this [manual](https://docs.docker.com/desktop/features/wsl/) for Windows install.
3. Run `docker-compose build` in the root of the repository and on success `docker-compose up`
4. [OPTIONAL] Initialize the database. Create a Python venv. Navigate to folder `initialize_empty_CHIMP` and execute `pip3 install --no-cache-dir -r initialize_requirements.txt -c constraints.txt` and on success execute `initialize_populate_empty_CHIMP.ipynb`
5. Open your browser and navigate to `http://localhost:5252`
6. Allow the CHIMP front-end to use your webcam.

To run the GPU enabled version of CHIMP use the "gpu" profile as follows: `docker-compose --profile gpu up -d`. To only
run the external services, such as MLFlow and RabbitMQ (e.g. when running the Python code directly on the host), use the "services" profile as
Expand Down
97 changes: 92 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
# application
# : sandbox application that enables emotion recognition from facial features
Expand All @@ -17,6 +15,7 @@ services:
- UID=1000
- GID=1000
- EXPERIMENT_NAME=onnx_emo_datastore
- MODEL_NAME=onnx_emo_datastore
- MODEL_INFERENCE_URL=http://serving-api:8000
- TRAINING_SERVER_URL=http://training-api:8000
#volumes:
Expand Down Expand Up @@ -54,14 +53,22 @@ services:
- TRACKING_URI=http://monitoring-server:8999
- CELERY_BROKER_URL=redis://message-queue:6379
- CELERY_RESULT_BACKEND=redis://message-queue:6379
- REDIS_HOST=message-queue
- REDIS_PORT=6379
- DATASTORE_ACCESS_KEY=yZmhrURuUhaeVSUagMRa
- DATASTORE_SECRET_KEY=cnk0OxGuIgVx4La0prNaWUv7JpriCnxZfq2417ba
- DATASTORE_URI=datastore:9000
# - DATABASE_URI=postgres-db:5432
- DATABASE_URI=postgres-db
- DATABASE_USER=chimp_user
- DATABASE_PASSWORD=chimp_password
- DATABASE_NAME=chimp_database
volumes:
- ${DATASETS_FOLDER:-./training/datasets}:/usr/src/app/datasets
- ./training/app/plugins:/usr/src/app/app/plugins
- ./training:/usr/src/app
depends_on:
- monitoring-server
- postgres-db
profiles:
- ''
- 'gpu'
Expand All @@ -82,14 +89,23 @@ services:
- TRACKING_URI=http://monitoring-server:8999
- CELERY_BROKER_URL=redis://message-queue:6379
- CELERY_RESULT_BACKEND=redis://message-queue:6379
- REDIS_HOST=message-queue
- REDIS_PORT=6379
- DATASTORE_ACCESS_KEY=yZmhrURuUhaeVSUagMRa
- DATASTORE_SECRET_KEY=cnk0OxGuIgVx4La0prNaWUv7JpriCnxZfq2417ba
- DATASTORE_URI=datastore:9000
# - DATABASE_URI=postgres-db:5432
- DATABASE_URI=postgres-db
- DATABASE_USER=chimp_user
- DATABASE_PASSWORD=chimp_password
- DATABASE_NAME=chimp_database
- TRAINING_SERVER_URL=http://training-api:8000
volumes:
- ${DATASETS_FOLDER:-./training/datasets}:/usr/src/app/datasets:ro
- ./training/app/plugins:/usr/src/app/app/plugins
- ./training:/usr/src/app
depends_on:
- monitoring-server
- postgres-db
profiles:
- ''
- 'worker-only'
Expand All @@ -116,14 +132,23 @@ services:
- TRACKING_URI=http://monitoring-server:8999
- CELERY_BROKER_URL=redis://message-queue:6379
- CELERY_RESULT_BACKEND=redis://message-queue:6379
- REDIS_HOST=message-queue
- REDIS_PORT=6379
- DATASTORE_ACCESS_KEY=yZmhrURuUhaeVSUagMRa
- DATASTORE_SECRET_KEY=cnk0OxGuIgVx4La0prNaWUv7JpriCnxZfq2417ba
- DATASTORE_URI=datastore:9000
# - DATABASE_URI=postgres-db:5432
- DATABASE_URI=postgres-db
- DATABASE_NAME=chimp_database
- DATABASE_USER=chimp_user
- DATABASE_PASSWORD=chimp_password
- TRAINING_SERVER_URL=http://training-api:8000
volumes:
- ${DATASETS_FOLDER:-./training/datasets}:/usr/src/app/datasets
- ./training/app/plugins:/usr/src/app/app/plugins
- ./training:/usr/src/app
depends_on:
- monitoring-server
- postgres-db
profiles:
- 'gpu'
- 'worker-only-gpu'
Expand Down Expand Up @@ -231,6 +256,68 @@ services:
- 'gpu'
- 'services'

# postgresql
# : database for managed datasets
postgres-db:
image: postgres:17
container_name: chimp-postgres
restart: unless-stopped
networks:
- backend-network
ports:
- "5432:5432"
environment:
POSTGRES_USER: chimp_user
POSTGRES_PASSWORD: chimp_password
POSTGRES_DB: chimp_database
volumes:
- ./docker-data/postgres:/var/lib/postgresql/data
profiles:
- ''
- 'gpu'
- 'services'


training-beat:
container_name: training-beat
build:
context: ./training
dockerfile: Dockerfile.worker
entrypoint: [""]
command: >
sh -c "celery -A manage:celery_app beat --loglevel=info"
volumes:
- ./training:/usr/src/app
environment:
- CELERY_BROKER_URL=redis://message-queue:6379
- CELERY_RESULT_BACKEND=redis://message-queue:6379
- REDIS_HOST=message-queue
- REDIS_PORT=6379
- DATASTORE_URI=datastore:9000
- DATASTORE_ACCESS_KEY=yZmhrURuUhaeVSUagMRa
- DATASTORE_SECRET_KEY=cnk0OxGuIgVx4La0prNaWUv7JpriCnxZfq2417ba
- TRACKING_URI=http://monitoring-server:8999
- DATABASE_URI=postgres-db
- DATABASE_USER=chimp_user
- DATABASE_PASSWORD=chimp_password
- DATABASE_NAME=chimp_database
depends_on:
message-queue:
condition: service_started
training-api:
condition: service_started
datastore:
condition: service_started
networks:
- backend-network
profiles:
- ''
- 'gpu'
- 'worker-only'




networks:
public-network:
name: 'chimp-public-network'
Expand Down
60 changes: 0 additions & 60 deletions docker-data/experimentation/config.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading
Loading