- Install CUDA Toolkit
https://developer.nvidia.com/cuda-10.1-download-archive-update2
- Install Anaconda
https://www.anaconda.com/distribution/#download-section
- Open Jupyter Notebook from Anaconda Navigator
- Open file
predict.ipynb
- Copy datasets into folder
Dataset\DATASET_NAME
Seperate each images labels into sub folder:
Dataset\DATASET_NAME\ABNORMAL
Dataset\DATASET_NAME\NORMAL
Only *.jpg is allow. - Change dataset name in line
dataset_name = "DDC Prison BLM TUA"
- Change model name in line
MODEL_NAME = 'blm_2_t_mn'
Training model will be save into foldersaved_model/
- Click run to training
- Install docker
https://www.docker.com/products/docker-desktop
- Right click from docker icon in taskbar then click
Settings
- Click
Resources\FILE SHARING
then tick drive that you want to save input and output folder.
Default is driveC:
.
Then clickApply & Restart
Button - Increase docker cpus and memory resource from
Resources\ADVANCED
then clickApply & Restart
Button - Create input and output folders in
C:\input
andC:\output
- Copy images that want to labels into
c:\input\000xxxx.jpg
.
Only *.jpg is allow. - Open Command Prompt then run these command.
docker run -v c:/input:/input -v c:/output:/output -it asia.gcr.io/thaihealthai/dac4tb:blm_2_t_mn-1.0.0 python predict.py
- The results will be in folder
c:\output\output_yyyymmmdddhhmmss.csv
- If input and output folders different from default. Please change
-v d:/input_folder:/input
-v d:/output_folder/:output
. - Change other dac4tb version from
asia.gcr.io/thaihealthai/dac4tb:blm_2_t_mn-1.0.0
- Easy way to predict is double click
predict.cmd