Skip to content

A keras implementation of RCF(Richer Convolutional Features for Edge Detection)

Notifications You must be signed in to change notification settings

fupiao1998/RCF-keras

Repository files navigation

RCF-keras

A keras implementation of RCF(Richer Convolutional Features for Edge Detection) for image edge detection.

Created by Yuxin Mao, if you have any problem in using it, please contact: maoyuxinssyh@my.swjtu.edu.cn

The backbones of this task now is VGG16, ResNet and ResNeXt. Maybe I will give a DenseNet and MobileNet implementation. And I implement the network structure in paper "Learning to Predict Crisp Boundaries"

To do list

  • VGG16 backbone
  • ResNet backbone
  • ResNeXt backbone
  • DenseNet backbone
  • MobileNet backbone
  • implementation of paper Learning to Predict Crisp Boundaries
  • Evaluation function of ODS F-score

A new implementation of paper [Learning to Predict Crisp Boundaries]!!

I implemented the edge detection model structure in the paper "Learning to Predict Crisp Boundaries"(For the convenience of description, I named it "PCB"). The main idea of the structure in the paper is to add a refinement module based on ResNeXt block, and the backbone of this paper is also VGG16. However, I have not implemented the loss function in this paper for the time being. The implementation and optimization of the loss function will be completed in the follow-up work.

What's more, I got a new idea from the "PCB" structure. Maybe I can fuse the idea of RCF and "PCB", which means combine the features of each layer of convolution in the PCB and fuse them. This experiment will also be completed in the follow-up work.

Train

For BSDS500 dataset, you can run the file 'data_generate_forBSD.py' for generate '.npy' files for train and validation. What you need to pay attention to is to modify the path of your data set.

Then you can run 'train.py' for train RCF series models, if you want to train "PCB" model, you can run 'train_PCB.py'. The reason for the difference between the two files is that RCF combines the features of multiple convolutional layers, but the PCB uses only one.

Model

Limited by my pool GPU memory(I just have singel Nvidia 940 GPU), I don't have enough computing power to train this model completely. So the following pre-train models maybe not get a good performance while testing and visualizing.

Download the pre-trained vgg-RCF model in BaiduNetDisk

Download the pre-trained "PCB" model in BaiduNetDiskpassword:e6l1 vgg model struct

Related Projects

RCF-pytorch

Keras-HED

About

A keras implementation of RCF(Richer Convolutional Features for Edge Detection)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages