This repository contains the code and resources for the Master Thesis titled, "Deep Learning-Based Detection of Obsessive-Compulsive Hand Washing". The project aims to develop an automated system using deep learning methods to detect instances of enacted obsessive-compulsive hand washing behavior.
- Task 1: Null vs. HW (HandWashing)
- Task 2: rHW (Routine Handwashing) vs. cHW (Compulsive Handwashing)
- Task 3: Null vs. rHW vs. rHW
- Task 4: Null vs. cHW
- Task 5: DL model personalization
The project requires a Linux system that is equipped with Cuda 11.7.
All subsequent commands assume that you have cloned the repository in your terminal and navigated to its location.
A file named "env.yml" contains all necessary python dependencies.
To conveniently install them automatically with anaconda you can use:
conda env create -f env.yml
conda activate ml23
To replicate our experiments, please download the corresponding processed data for DeepLearning experiments and feature data for ML experiments. Extract these zip files into the data
folder.
The folder configs
consists of different configurations for different tasks which names must be passed as an argument for targeted task.
As per the thesis work, following configs files are as indicated in the file_name
$ python main.py configs/[config_file_name] --m [method] --t [task_type] --d
- To prepare dataset before running pass flag
--d
- The original datset
OCDetect_Export
by Burchard et al. must be inside data folder. - If not passed, the pre-existed data will be used.
- Pass
--d
to pre-process before start training
$ python main.py configs/task1_adam.yaml --m dl
$ python main.py configs/task1_sgd.yaml --m dl
$ python main.py configs/task2_adam.yaml --m dl
$ python main.py configs/task2_sgd.yaml --m dl
$ python main.py configs/task3_adam.yaml --m dl
$ python main.py configs/task3_sgd.yaml --m dl
$ python main.py configs/task4_adam.yaml --m dl
$ python main.py configs/task4_sgd.yaml --m dl
$ python main.py configs/task5_adam.yaml --m dl
$ python main.py configs/task5_sgd.yaml --m dl
None: To run Task-5, Task-2 must be completed so that the best models will be saved in best_model
folder.
None: To run Task-5, Task-2 must be completed so that the best models will be saved in best_model
folder.
- Pass
--d
to pre-process before start training
$ python main.py configs/task1_adam.yaml --m ml
$ python main.py configs/task1_sgd.yaml --m ml
$ python main.py configs/task2_adam.yaml --m ml
$ python main.py configs/task2_sgd.yaml --m ml
$ python main.py configs/task3_adam.yaml --m ml
$ python main.py configs/task3_sgd.yaml --m ml
$ python main.py configs/task4_adam.yaml --m ml
$ python main.py configs/task4_sgd.yaml --m ml
None: To run Task-5, Task-2 must be completed so that the best models will be saved in best_model
folder.
None: To run Task-5, Task-2 must be completed so that the best models will be saved in best_model
folder.
The 'saved' folder consists of folders where the results will be stored.
- Logs are stored in
logs
folder - Charts are stored in
charts
folder - Models are stored in
models
folder - Results are stored in
results
folder
├── saved
│ ├── 2024-01-24..
│ ├ ├── charts
│ ├ ├── logs
│ ├ ├── models
│ ├ ├── results
│ ├ ├── 2024-01-24.csv
├── src
└── .gitignore
The jobscripts are stored inside jobscripts
folder
$ bash run_dl.sh
$ bash run_ml.sh
$ bash run_personalized.sh
For questions and comments please contact Amir Thapa Magar via mail