Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Richer Convolutional Features for Edge Detection

License

NotificationsYou must be signed in to change notification settings

yun-liu/RCF

Repository files navigation

We have released the code and data for plotting the edge PR curves of many existing edge detectorshere.

Citation

If you are using the code/model/data provided here in a publication, please consider citing:

@article{liu2019richer,  title={Richer Convolutional Features for Edge Detection},  author={Liu, Yun and Cheng, Ming-Ming and Hu, Xiaowei and Bian, Jia-Wang and Zhang, Le and Bai, Xiang and Tang, Jinhui},  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},  volume={41},  number={8},  pages={1939--1946},  year={2019},  publisher={IEEE}}@article{liu2022semantic,  title={Semantic edge detection with diverse deep supervision},  author={Liu, Yun and Cheng, Ming-Ming and Fan, Deng-Ping and Zhang, Le and Bian, JiaWang and Tao, Dacheng},  journal={International Journal of Computer Vision},  volume={130},  pages={179--198},  year={2022},  publisher={Springer}}

PyTorch version of RCF

For the PyTorch implementation of RCF, please refer to this repository:yun-liu/RCF-PyTorch (a clean version ofbalajiselvaraj1601/RCF_Pytorch_Updated). Thanks for Balaji's contribution! This PyTorch implementation can reproduce the accuracy of the Caffe version.

Jittor version of RCF

For the Jittor implementation of RCF, please refer to this repository:yun-liu/RCF-Jittor.

Evaluation results

Evaluation results on the BSDS500 and NYUD datasets are availablehere.

Precomputed results

The precomputed edge maps for BSDS500 dataset are availablehere.

The precomputed segmentation results (UCM2, generated by RCF+COB) for BSDS500 and NYUD datasets are availablehere.

Pretrained models

RCF model for BSDS500 dataset is availablehere.

RCF model for NYUD dataset is available here (Depth andImage).

Testing RCF

  1. Clone the RCF repository

    git clone https://github.com/yun-liu/rcf.git
  2. Download pretrained models, and put them into the$ROOT_DIR/examples/rcf/ folder.

  3. Download the datasets you need as below, and extract these datasets to the$ROOT_DIR/data/ folder.

    wget http://mftp.mmcheng.net/liuyun/rcf/data/bsds_pascal_train_pair.lstwget http://mftp.mmcheng.net/liuyun/rcf/data/HED-BSDS.tar.gzwget http://mftp.mmcheng.net/liuyun/rcf/data/PASCAL.tar.gzwget http://mftp.mmcheng.net/liuyun/rcf/data/NYUD.tar.gz
  4. Build Caffe.

  5. Go into the folder$ROOT_DIR/examples/rcf/. Then, you can run RCF-singlescale.ipynb to test single-scale RCF on the BSDS500 dataset, or run RCF-multiscale.ipynb to test multiscale RCF on the BSDS500 dataset, or run RCF-singlescale-NYUD.ipynb to test single-scale RCF on the NYUD dataset.

Note: Before evaluating the predicted edges, you should do the standard non-maximum suppression (NMS) and edge thinning. We used the Piotr's Structured Forest matlab toolbox availablehere.

Training RCF

  1. Download the datasets you need.

  2. Download the pretrained vgg16 modelhere.

  3. Start training process by running the following commands:

    cd $ROOT_DIR/examples/rcf/./train.sh

ResNet version of RCF

The code for the ResNet version of RCF has been released. The pretrained ImageNet and BSDS500 models are availablehere. Some discussion can be found under theissue #89.

What is the "AutoCrop" layer?

The "AutoCrop" layer in RCF can caculate the crop offset automatically, and the recent version of Caffe doesn't support this. In fact, we can calculate the crop offset by ourselves, so we can replace the "AutoCrop" layer with the standard Crop layer in Caffe by setting the offsets to 1, 2, 4, and 0 for conv2, conv3, conv4, and conv5, respectively. More details can be found under theissue #24.

Acknowledgments

This code is based on HED (s9xie/hed). Thanks to the contributors of HED.

About

Richer Convolutional Features for Edge Detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp