This repo is an official unofficial version of DexiNed in Pytorch. The first official version of DexiNed is in Tensorflow.
- Python 3.7
- Pytorch 1.0.1
- OpenCV
- Torchgeometry
To train DexiNed in Pytorch is similar to training in Tensorflow. For more details see DexiNed.
To summarize: firstly you should download and unzip the BIPED dataset hosted in Kaggle. Secondly, augment the dataset with this ripo. Once the BIPED is augmented set the base dir and set the model for training in main.py:
python main.py
Then, just train.
In dexi_utils.py we have added the popular datasets used in edge, contour, and boundary detection. So you should choose the dataset in main():
DATASET_NAME= ['BIPED','BSDS','BSDS300','CID','DCD','MULTICUE',
'PASCAL','NYUD','CLASSIC'] # 8
TEST_DATA = DATASET_NAME[0]
And set for testing the following lines:
python main.py --is_testing=True --use_prev_trained True --checkpoint_data 24/24_model.pth
Colab [link]
- The whole of input image are sized with the same image width and height if you could help us setting with individual image size we will thank you :)
After setting up you just need to run and that's it
Before testing in the single image please make sure that the images used for testing in data directory have the same size. Otherwise, the data will be resized with the default values in dexi_utils.py.
Please cite the paper if you find helpful,
@InProceedings{soria2020dexined,
title={Dense Extreme Inception Network: Towards a Robust CNN Model for Edge Detection},
author={Xavier Soria and Edgar Riba and Angel Sappa},
booktitle={The IEEE Winter Conference on Applications of Computer Vision (WACV '20)},
year={2020}
}
+ If you find some typos or you think we can improve the code, we will appreciate your contribution