Skip to content

chaddy1004/sobel-operator-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sobel-operator-python

Introduction

This repo is Sobel edge detection implemented on PyTorch. Sobel edge detection works by sliding a kernel and performing cross correlation operation.

Since Conv2d in PyTorch (and other frameworks like Tensorflow or Keras) is essentially an optimized implementation of cross correlation operation, we can take advantage of this to perform Sobel Edge detector in a very quick and optimized way.

This is expandable to other filters that utilizes cross correlation operation such as Gaussian Blur, and Laplacian.

Running the Code

python main.py

Requirements

torch 1.4.0
numpy 1.18.1
opencv-python 4.2.0.34

Results

Releases

No releases published

Packages

No packages published

Languages