DAME:Automatic detection of melanins and sebums from skin images using generative adversarial network
datacontains data processing related scripts.datasetscontains pre-training script.modelscontains Pix2pix related deep learning model.optionscontains scripts that configure the relevant parameters.utilcontains frame application related scripts.
prepare.pycontains code about image gray and image enchancement.test.pycontains related code to test.train.pycontains related code to train.
git clonethis project;
note:ImageDataset folder is test dataset;SourceCodes folder is model source code
cd DAME/SourceCodes(root directory),new folder namedimage, the directory structure is as follows: place the original image in the jpg folder and place the marked image in the mark folder.
image
│ ├── finish
│ ├── origin
│ │ ├── black
│ │ │ ├── jpg
│ │ │ └── mark
│ │ └── oil
│ │ ├── jpg
│ │ └── mark
- run
python prepare.pyand it will generate image after process(DAME or guassian or CLAHE). the directory structure is as follows:
image
│ ├── finish
│ │ ├── black
│ │ │ ├── jpg
│ │ │ └── mark
│ │ └── oil
│ │ ├── jpg
│ │ └── mark
│ ├── origin
note: different processes correspond to different functions DAME:prepare.py/gray,guassian:prepare.py/gaussian,CLAHE:prepare.py/clahe
- in the root directory, run
python datasets/combine_A_and_B.py --fold_A finish/black/jpg --fold_B finish/black/mark --fold_AB finish/black/ --no_multiprocessing, It will generate the dataset required by the pix2pix model. - train model:
python train.py --dataroot finish/black --model pix2pix --name black - test model:
python test.py --dataroot ./datasets/black/ --name black --model pix2pix