⭐ This code has been completely released ⭐
Python 3.6
Pytorch 1.7.0
- The download link for the datasets is here. Put the datasets as follows:
DFLNet
├── BUSI-WHU
│ ├── train
│ │ ├── img
│ │ │ ├── 00001.bmp
│ │ │ ├── 00002.bmp
│ │ │ ├── .....
│ │ ├── gt
│ │ │ ├── 00001.bmp
│ │ │ ├── 00002.bmp
│ │ │ ├── .....
│ ├── valid
│ │ ├── img
│ │ │ ├── 00009.bmp
│ │ │ ├── 00015.bmp
│ │ │ ├── .....
│ │ ├── gt
│ │ │ ├── 00009.bmp
│ │ │ ├── 00015.bmp
│ │ │ ├── .....
│ ├── test
│ │ ├── img
│ │ │ ├── 00007.bmp
│ │ │ ├── 00008.bmp
│ │ │ ├── .....
│ │ ├── gt
│ │ │ ├── 00007.bmp
│ │ │ ├── 00008.bmp
│ │ │ ├── .....
Modify the paths in lines 22 to 30 of the train.py, then simply run:
python train.py
- The download link for the pretrain_pth is here.
Modify the paths in lines 14 to 15 of the eval.py, then simply run:
python eval.py
Modify the paths in lines 13 to 17 of the visualization.py, then simply run:
python visualization.py
- Note that batch-size must be 1 when using visualization.py
- Besides, you can adjust the parameter of full_to_color to change the color