## Prerequisties and Run
This code has been implemented in python language using Keras libarary with tensorflow backend and tested in ubuntu OS, though should be compatible with related environment. following Environement and Library needed to run the code:
- Python 3 </br>
- Keras 2.2.0 </br>
- tensorflow 1.13.1 </br>
## Run Demo
For training deep model and evaluating on each data set follow the bellow steps:</br>
1- Download the ISIC 2018 train dataset from [this](https://challenge.isic-archive.com/data) link and extract both training dataset and ground truth folders inside the `dataset_isic18`. </br>
2- Run `Prepare_ISIC2018.py` for data preperation and dividing data to train,validation and test sets. </br>
3- Run `Train_Skin_Lesion_Segmentation.py` for training the model using trainng and validation sets. The model will be train for 100 epochs and it will save the best weights for the valiation set. </br>
4- For performance calculation and producing segmentation result, run `Evaluate_Skin.py`. It will represent performance measures and will saves related results in `output` folder.</br>
**Notice:**
For training and evaluating on ISIC 2017 and ph2 follow the bellow steps: :</br>
**ISIC 2017**- Download the ISIC 2017 train dataset from [this](https://challenge.isic-archive.com/data) link and extract both training dataset and ground truth folders inside the `dataset_isic18\7`. </br> then Run ` Prepare_ISIC2017.py` for data preperation and dividing data to train,validation and test sets. </br>
**ph2**- Download the ph2 dataset from [this](https://www.dropbox.com/s/k88qukc20ljnbuo/PH2Dataset.rar) link and extract it then Run ` Prepare_ph2.py` for data preperation and dividing data to train,validation and test sets. </br>
Follow step 3 and 4 for model traing and performance estimation. For ph2 dataset you need to first train the model with ISIC 2018 data set and then fine-tune the trained model using ph2 dataset.
## Quick Overview
### Diagram of the proposed method

### Frequency attention mechanism

#### Performance Evalution on the Skin Lesion Segmentation ISIC 2018
Methods | Year |F1-scores | Sensivity| Specificaty| Accuracy | PC | JS
------------ | -------------|----|-----------------|----|---- |---- |----
Ronneberger and etc. all [U-net](https://arxiv.org/abs/1505.04597) |2015 | 0.647 |0.708 |0.964 |0.890 |0.779 |0.549
Alom et. all [Recurrent Residual U-net](https://arxiv.org/abs/1802.06955) |2018 | 0.679 |0.792 |0.928 |0.880 |0.741 |0.581
Oktay et. all [Attention U-net](https://arxiv.org/abs/1804.03999) |2018 | 0.665 |0.717 |0.967 |0.897 |0.787 | 0.566
Alom et. all [R2U-Net](https://arxiv.org/ftp/arxiv/papers/1802/1802.06955.pdf) |2018 | 0.691 |0.726 |0.971 |0.904 |0.822 | 0.592
Azad et. all [BCDU-Net](https://github.com/rezazad68/LSTM-U-net/edit/master/README.md) |2019 | 0.847 |0.783 |0.980 |0.936 |0.922| 0.936
Asadi et. all [MCGU-Net](https://128.84.21.199/pdf/2003.05056.pdf) |2020 | 0.895 |0.848 |0.986 |0.955 |0.947| 0.955
Azad et. all [Attention Deeplabv3p](https://www.bioimagecomputing.com/program/selected-contributions/) |2021 | **0.927** |**0.915** |**0.986** |**0.973** |..| **0.973**
### Segmentation visualization

#### Performance Evalution on the Skin Lesion Segmentation ISIC 2017
will be updated
### Segmentation visualization

#### Performance Evalution on the Skin Lesion Segmentation PH2
will be updated.
### Segmentation visualization

### Segmentation resutls on Lung CT dataset

### Segmentation results on SegPC2021
