Structured Edge Detection Toolbox

Related tags

Deep Learning edges
Overview
###################################################################
#                                                                 #
#    Structured Edge Detection Toolbox V3.0                       #
#    Piotr Dollar (pdollar-at-gmail.com)                          #
#                                                                 #
###################################################################

1. Introduction.

Very fast edge detector (up to 60 fps depending on parameter settings) that achieves excellent accuracy. Can serve as input to any vision algorithm requiring high quality edge maps. Toolbox also includes the Edge Boxes object proposal generation method and fast superpixel code.

If you use the Structured Edge Detection Toolbox, we appreciate it if you cite an appropriate subset of the following papers:

@inproceedings{DollarICCV13edges,
  author    = {Piotr Doll\'ar and C. Lawrence Zitnick},
  title     = {Structured Forests for Fast Edge Detection},
  booktitle = {ICCV},
  year      = {2013},
}

@article{DollarARXIV14edges,
  author    = {Piotr Doll\'ar and C. Lawrence Zitnick},
  title     = {Fast Edge Detection Using Structured Forests},
  journal   = {ArXiv},
  year      = {2014},
}

@inproceedings{ZitnickECCV14edgeBoxes,
  author    = {C. Lawrence Zitnick and Piotr Doll\'ar},
  title     = {Edge Boxes: Locating Object Proposals from Edges},
  booktitle = {ECCV},
  year      = {2014},
}

###################################################################

2. License.

This code is published under the MSR-LA Full Rights License.
Please read license.txt for more info.

###################################################################

3. Installation.

a) This code is written for the Matlab interpreter (tested with versions R2013a-2013b) and requires the Matlab Image Processing Toolbox. 

b) Additionally, Piotr's Matlab Toolbox (version 3.26 or later) is also required. It can be downloaded at:
 https://pdollar.github.io/toolbox/.

c) Next, please compile mex code from within Matlab (note: win64/linux64 binaries included):
  mex private/edgesDetectMex.cpp -outdir private [OMPPARAMS]
  mex private/edgesNmsMex.cpp    -outdir private [OMPPARAMS]
  mex private/spDetectMex.cpp    -outdir private [OMPPARAMS]
  mex private/edgeBoxesMex.cpp   -outdir private
Here [OMPPARAMS] are parameters for OpenMP and are OS and compiler dependent.
  Windows:  [OMPPARAMS] = '-DUSEOMP' 'OPTIMFLAGS="$OPTIMFLAGS' '/openmp"'
  Linux V1: [OMPPARAMS] = '-DUSEOMP' CFLAGS="\$CFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp"
  Linux V2: [OMPPARAMS] = '-DUSEOMP' CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp"
To compile without OpenMP simply omit [OMPPARAMS]; note that code will be single threaded in this case.

d) Add edge detection code to Matlab path (change to current directory first): 
 >> addpath(pwd); savepath;

e) Finally, optionally download the BSDS500 dataset (necessary for training/evaluation):
 http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/
 After downloading BSR/ should contain BSDS500, bench, and documentation.

f) A fully trained edge model for RGB images is available as part of this release. Additional models are available online, including RGBD/D/RGB models trained on the NYU depth dataset and a larger more accurate BSDS model.

###################################################################

4. Getting Started.

 - Make sure to carefully follow the installation instructions above.
 - Please see "edgesDemo.m", "edgeBoxesDemo" and "spDemo.m" to run demos and get basic usage information.
 - For a detailed list of functionality see "Contents.m".

###################################################################

5. History.

Version NEW
 - now hosting on github (https://github.com/pdollar/edges)
 - suppress Mac warnings, added Mac binaries
 - edgeBoxes: added adaptive nms variant described in arXiv15 paper

Version 3.01 (09/08/2014)
 - spAffinities: minor fix (memory initialization)
 - edgesDetect: minor fix (multiscale / multiple output case)

Version 3.0 (07/23/2014)
 - added Edge Boxes code corresponding to ECCV paper
 - added Sticky Superpixels code
 - edge detection code unchanged

Version 2.0 (06/20/2014)
 - second version corresponding to arXiv paper
 - added sharpening option
 - added evaluation and visualization code
 - added NYUD demo and sweep support
 - various tweaks/improvements/optimizations

Version 1.0 (11/12/2013)
 - initial version corresponding to ICCV paper

###################################################################
Comments
  • error while running edgesDemo.m

    error while running edgesDemo.m

    Hi there !

    first thanks pdollar for sharing your work, the results are astonishing !

    however i'm new to matlab and I got some problems trying to make it work :

    I did everything carefully in the installation method but then when I try to run edgesDemo.m I got this error :

    Error using imPadMex
    Requested 137438953888x1726576853504x7598263500303858035 (17179869184.0GB) array exceeds 
    maximum array size preference. Creation of arrays greater than 
    this limit may take a long time and cause MATLAB to become unresponsive.
    See array size limit or preference panel for more information.
    

    and several others but they come from the first one I think

    Error in imPad (line 39)
    J = imPadMex( I, pad, type );
    
    Error in edgesDetect (line 52)
      I = imPad(I,p,'symmetric');
    
    Error in edgesDemo (line 25)
    tic, E=edgesDetect(I,model); toc
    

    As I said i'm quite new to matlab and didn't find yet where this imPadMex error does come from, any help would be greatly appreciated.

    opened by crasse2 7
  • Where to download additional model (D/RGBD)

    Where to download additional model (D/RGBD)

    I've seen in README there are additional models online, but I can't find them on the Internet. Would you give a specific link where I can download them? Many thanks!

    opened by claudehang 4
  • Compile Mex Code returns error

    Compile Mex Code returns error

    I've installed the toolbox and trying to compile the mex file. But I keep getting this error with or without [OMPPARAMS]. I'm using Linux and 6.3 version of gcc.

    
    private/edgesDetectMex.cpp:103:71: error: cannot convert ‘const int*’ to ‘const mwSize* {aka const long unsigned int*}’ for argument ‘2’ to ‘mxArray* mxCreateNumericArray_730(mwSize, const mwSize*, mxClassID, mxComplexity)’
       if(nl>2) pl[2] = mxCreateNumericArray(5,segDims,mxUINT8_CLASS,mxREAL);
    

    Any idea what the issue is?

    opened by alex-yin 3
  • Alpha parameter in edgeBoxesMex.c

    Alpha parameter in edgeBoxesMex.c

    Hi,

    I have a problem in understanding the Alpha parameter from the edgeBoxesMex.c file. In which function the Alpha parameter is used? I want to see how the step size alpha is related to the IoU

    opened by Addhi86 2
  • Is there xml model for C++ official openCV example?

    Is there xml model for C++ official openCV example?

    Hi! Thanks for your work! Is it possible to get xml of your model for this example I am trying to convert this file to xml.

    Also I didn't look yet deep inside implementation. But maybe there is some other implementation (I suppose it's your code)? It looks heavy and slowly. Thank you!

    opened by im7mortal 2
  • Edge Box for a new dataset

    Edge Box for a new dataset

    Hello,

    I want to use the edge box on my dataset and compare its performance with Selective search. In the edgeBoxesDemo.m, I have run the code with split='val' which i used the training set of Voc2007. The 2 graphs with the default setting like

    model=load('models/forest/modelBsds'); model=model.model;
    model.opts.multiscale=0; model.opts.sharpen=2; model.opts.nThreads=4;
    
    %% set up opts for edgeBoxes (see edgeBoxes.m)
    opts = edgeBoxes;
    opts.alpha = .65;     % step size of sliding window search
    opts.beta  = .75;     % nms threshold for object proposals
    opts.minScore = .01;  % min score of boxes to detect
    opts.maxBoxes = 1e4;  % max number of boxes to detect
    

    it shows me an output: EdgeBoxes70 T=0.70 A=0.46 M= 804 R=0.87 Which is similar to Figure 5 (I guess). But it is mentioned in the paper that for the comparison of Edge Box with other methods you used test set.

    So for the test set I have changed the training set with testing set in the \boxes folder and changed this part in the code split='test'; data=boxesData('split',split);

    and I am getting this output EdgeBoxes70 T=0.70 A=0.47 M= 656 R=0.88

    Therefore, I have couple of questions:

    1. Why the test result is different from the paper. like According to table 2, the value of should be 800 not 656 ? Or i did something wrong

    2. How can I plot the Figure 5 graph for the selective search method using VOC 2007 dataset?

    3. Also, if i used the Edge box for different dataset do I need to train new model? Please help me to solve this

    opened by Addhi86 2
  • edgesTrain parfor issue and issues following the solution

    edgesTrain parfor issue and issues following the solution

    ??? Error: File: edgesTrain.m Line: 157 Column: 18 The variable eBins in a parfor cannot be classified. See Parallel for Loops in MATLAB, "Overview".

    I am getting this error while trying to run edgesDemo. It looks like the error stems from using two different indices within the loop. The variables need sliced to operate correctly.

    Switching to something like this:

    parfor i=1:nTrees*nNodes if(model.child(i) || model.nSegs(i)==1), continue;end %#ok<PFBNS> E=gradientMag(single(model.segs(:,:,i)))>.01; E0=0; sliceBins = eBins{i}; sliceBnds = eBnds(i); for j=1:nBnds, %eBins{i,j}=uint16(find(E & ~E0)'-1); E0=E; %eBnds(i,j)=length(eBins{i,j}); E=convTri(single(E),1)>.01; end sliceBins{j} = unit16(find(E&~E0)'-1); E0=E; sliceBnds(j)=length(sliceBins{j}); E=convTri(single(E),1)>0.1; end

    Solves the issue.

    EDIT: Solved the issue that results from the solution of this issue. I needed to add the toolbox path back in because it got removed.

    opened by tteresi7 2
  • Extension to 3D?

    Extension to 3D?

    Hi Piotr,

    Have you thought of extending the future version to classifying edges in 3D? I have been using now your code on a slice-by-slice basis for our 2-PM microscope stacks trained with our own ground truths, and the results are quite good :) I would assume that the results would be even better if full 3D context would be taken into account?

    Petteri

    opened by petteriTeikari 2
  • evaluation of edge result on NYUD dataset

    evaluation of edge result on NYUD dataset

    Thanks for your continuous work on edge detection and kind sharing.

    Excuse me. I came up against a problem when testing my model on NYU depth dataset.

    I could not find the NYUD edge ground truth file after training on its training sets, could you please give me any advice?

    Thanks in advance.

    opened by rrryan2016 1
  • error while running edgesDemo.m:

    error while running edgesDemo.m: "Out of memory."

    I'm running this in R2014a.

    After running edgesDemo, I get this error message:

    Error using imPadMex Out of memory. Type HELP MEMORY for your options.

    Error in imPad (line 39) J = imPadMex( I, pad, type );

    Error in edgesDetect (line 52) I = imPad(I,p,'symmetric');

    Error in edgesDemo (line 26) tic, E=edgesDetect(I,model); toc

    I don't think it's a memory problem, however. I believe this because if I go into the edgesDemo.m code and adapt the 'peppers.png' image, called on line 24, to make it a 25:25:3 image (by adding a line at line 25, "I = I(1:25, 1:25, :);" it still outputs "Out of memory". Any ideas would be appreciated.

    opened by guyreading 1
  • Link to Piotr's Matlab Toolbox is not accessible

    Link to Piotr's Matlab Toolbox is not accessible

    Hi,

    The link to Piotr's Matlab Toolbox (http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html) is not accessible. Is there any other web page where I can download the toolbox?

    Thank you!

    opened by jyhjinghwang 1
  • Could you explain me about the Average Precision (AP) ?

    Could you explain me about the Average Precision (AP) ?

    Dear @pdollar or anyone :)

    First of all @pdollar thanks for your contribution. Secondly, in more detailed info, I would like to know-how is the AP computed?

    Cheers

    Xavier

    opened by xavysp 0
  • Error while running edgeChns.m

    Error while running edgeChns.m

    Hi! Thanks pdollar for this excellent work. I'm trying to run edgesDemo.m, before that, I install it as Installation in readme.txt. But when the program running to the 25 line in edgesDemo.m, it call the edgesDetect.m, and then edgesDetect call the edgesChns.m, in 58 lines in edgesChns.m, it call gradientMag.cpp, and Matlab was down. I have tried several times and it is same. Help! image image

    The environment I use: Mac OS Mojave 10.14 5 Matlab 2017 Xcode Clang++ to configure mex

    opened by zhuzihao-hz 0
  • Question

    Question

    I am confused about the function of correspondPixels().And there is a compiled lib so I can't see code. Can you give some explanation about it? Thank you

    opened by CNHNLP 0
  • error in training  tree

    error in training tree

    Hi,pdollar. I try train tree myself,but it alaways have the error: Unable to read file 'BSR/BSDS500/data//groundTruth/train/Thumb.mat'. No such file or directory. PS:when I reduce the number of the patch,it run ok.I guess if it is related to the number of data? can you help me?thanks a lot

    opened by wanfuzhubao 0
  • error while running edgesDemo.m

    error while running edgesDemo.m

    i'm new to matlab and I got some problems trying to make it work :

    I did everything carefully in the installation method a but then when I try to run edgesDemo.m I got this error :

    Error using imPadMex
    Requested 137438953888x1726576853504x7598263500303858035 (17179869184.0GB) array exceeds 
    maximum array size preference. Creation of arrays greater than 
    this limit may take a long time and cause MATLAB to become unresponsive.
    See array size limit or preference panel for more information.
    

    and several others but they come from the first one I think

    Error in imPad (line 39)
    J = imPadMex( I, pad, type );
    
    Error in edgesDetect (line 52)
      I = imPad(I,p,'symmetric');
    
    Error in edgesDemo (line 25)
    tic, E=edgesDetect(I,model); toc
    

    As I said i'm quite new to matlab and didn't find yet where this imPadMex error does come from, any help would be greatly appreciated.

    opened by Passagers123a 1
Owner
Piotr Dollar
Piotr Dollar
LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.

TuZheng 405 Jan 4, 2023
Code for the ICCV 2021 paper "Pixel Difference Networks for Efficient Edge Detection" (Oral).

Pixel Difference Convolution This repository contains the PyTorch implementation for "Pixel Difference Networks for Efficient Edge Detection" by Zhuo

Alex 236 Dec 21, 2022
pcnaDeep integrates cutting-edge detection techniques with tracking and cell cycle resolving models.

pcnaDeep: a deep-learning based single-cell cycle profiler with PCNA signal Welcome! pcnaDeep integrates cutting-edge detection techniques with tracki

ChanLab 8 Oct 18, 2022
a reimplementation of Holistically-Nested Edge Detection in PyTorch

pytorch-hed This is a personal reimplementation of Holistically-Nested Edge Detection [1] using PyTorch. Should you be making use of this work, please

Simon Niklaus 375 Dec 6, 2022
Implementation for the paper 'YOLO-ReT: Towards High Accuracy Real-time Object Detection on Edge GPUs'

YOLO-ReT This is the original implementation of the paper: YOLO-ReT: Towards High Accuracy Real-time Object Detection on Edge GPUs. Prakhar Ganesh, Ya

null 69 Oct 19, 2022
CenterFace(size of 7.3MB) is a practical anchor-free face detection and alignment method for edge devices.

CenterFace Introduce CenterFace(size of 7.3MB) is a practical anchor-free face detection and alignment method for edge devices. Recent Update 2019.09.

StarClouds 1.2k Dec 21, 2022
A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......

A Light and Fast Face Detector for Edge Devices Big News: LFD, which is a big update of LFFD, now is released (2021.03.09). It is strongly recommended

YonghaoHe 1.3k Dec 25, 2022
Image Processing, Image Smoothing, Edge Detection and Transforms

opevcvdl-hw1 This project uses openCV and Qt to achieve the requirements. Version Python 3.7 opencv-contrib-python 3.4.2.17 Matplotlib 3.1.1 pyqt5 5.1

Kenny Cheng 3 Aug 17, 2022
BED: A Real-Time Object Detection System for Edge Devices

BED: A Real-Time Object Detection System for Edge Devices About this project Thi

Data Analytics Lab at Texas A&M University 44 Nov 18, 2022
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 5, 2023
MMDetection3D is an open source object detection toolbox based on PyTorch

MMDetection3D is an open source object detection toolbox based on PyTorch, towards the next-generation platform for general 3D detection. It is a part of the OpenMMLab project developed by MMLab.

OpenMMLab 3.2k Jan 5, 2023
An Unsupervised Graph-based Toolbox for Fraud Detection

An Unsupervised Graph-based Toolbox for Fraud Detection Introduction: UGFraud is an unsupervised graph-based fraud detection toolbox that integrates s

SafeGraph 99 Dec 11, 2022
An open source object detection toolbox based on PyTorch

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

Bo Chen 24 Dec 28, 2022
OpenPCDet Toolbox for LiDAR-based 3D Object Detection.

OpenPCDet OpenPCDet is a clear, simple, self-contained open source project for LiDAR-based 3D object detection. It is also the official code release o

OpenMMLab 3.2k Dec 31, 2022
Mmdetection3d Noted - MMDetection3D is an open source object detection toolbox based on PyTorch

MMDetection3D is an open source object detection toolbox based on PyTorch

Jiangjingwen 13 Jan 6, 2023
OBBDetection: an oriented object detection toolbox modified from MMdetection

OBBDetection note: If you have questions or good suggestions, feel free to propose issues and contact me. introduction OBBDetection is an oriented obj

MIXIAOXIN_HO 3 Nov 11, 2022
YolactEdge: Real-time Instance Segmentation on the Edge

YolactEdge, the first competitive instance segmentation approach that runs on small edge devices at real-time speeds. Specifically, YolactEdge runs at up to 30.8 FPS on a Jetson AGX Xavier (and 172.7 FPS on an RTX 2080 Ti) with a ResNet-101 backbone on 550x550 resolution images.

Haotian Liu 1.1k Jan 6, 2023
EDCNN: Edge enhancement-based Densely Connected Network with Compound Loss for Low-Dose CT Denoising

EDCNN: Edge enhancement-based Densely Connected Network with Compound Loss for Low-Dose CT Denoising By Tengfei Liang, Yi Jin, Yidong Li, Tao Wang. Th

workingcoder 115 Jan 5, 2023