-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
34 lines (22 loc) · 1.98 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
description of parameters:
--mode:
test: test the model, need label file.
train: train the model and save model in pca_model.sav and clf_model.sav. These two files will saved in /app/model, so you can mount local disk folder to /app/model to save it to local disk.. label file is needed.
test_predict: test the model and the prediction.
predict: load model from the model files and predict data. Must run after model is generated by train.
--folder_path
This should be the path of folder in which the images are stored. Default is /app/data. So using mount (-v in docker) to mount images in local disk to /app/data then it can work.
--folder__mode
This shows whether the program run through all sub-directories under the folder path. 1 is the default, which is run all sub-directories. 0 is only the current folder.
--label
This should be the file contains label information. The order of label should be same to the order in file_list.txt, in which saves all image files paths and names.
--image_path
This is only used in predict mode. This is the path of the image which you want to predict.
--model_path
This is the path to the folder in which saves the model. The default is model/ . You can just mount the model_folder, which contains pca_model.sav and clf_model.sav, to /app/model so that the program can work. This is also the path in which will save the trained model.
--prediction_file
This is the path to the folder in which will save the prediction result. The default is prediction/prediction.json . So you can just mount the prediction folder in local disk to /app/prediction so the prediction.txt will save to local disk.
--resize_to
This is the parameter which decide the size of intermediate image. The program will first resize the original image to square image whose size is "resize_to*resize_to", then put it into pca model.
--pca_components
This is the parameter which decide the final size of features. If this is changed, the model need re-training.