Giter Site home page Giter Site logo

cannyedgepytorch's People

Contributors

dcurro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cannyedgepytorch's Issues

batch issue

I think there is something wrong in the forward function of networks as it doesn't supports arbitary batch sizes, it only supports batch size of 1

License requested

It would be wonderful if there was a license associated with this repo. I'd love to use it in my research, but I can't without knowing its license; public-use permissions are not implied by the absence of a license in a GitHub repo.

Backward anomaly problem

Thank you very much for your work, I found an anomaly when I try to differentiate it and do the backward step, your Net has many in-place operations which makes it impossible to calculate the gradients. If anyone encounters the same problem replace the first few lines in the forward function to:

    def forward(self, img):

        blurred_img_r = self.gaussian_filter_vertical(self.gaussian_filter_horizontal(img[:, 0:1]))
        blurred_img_g = self.gaussian_filter_vertical(self.gaussian_filter_horizontal(img[:, 1:2]))
        blurred_img_b = self.gaussian_filter_vertical(self.gaussian_filter_horizontal(img[:, 2:3]))

        grad_x_r = self.sobel_filter_horizontal(blurred_img_r)
        grad_y_r = self.sobel_filter_vertical(blurred_img_r)
        grad_x_g = self.sobel_filter_horizontal(blurred_img_g)
        grad_y_g = self.sobel_filter_vertical(blurred_img_g)
        grad_x_b = self.sobel_filter_horizontal(blurred_img_b)
        grad_y_b = self.sobel_filter_vertical(blurred_img_b)

runtime error

Hello, thanks for your great work!

But there are some errors when I try to use your code.
Some runtime errors occur in the forward part, line 120
channel_select_filtered_positive = all_filtered.view(-1)[indices.long()].view(1,height,width)
RuntimeError: index -9223372036854775808 is out of bounds for dimension 0 with size 524288

I am a new hand in coding and I can not find the reasons. Can you help me to see why it occurs? Thanks a lot!

Two bugs encountered

Great work - thanks a lot for this!

When using the code on some test images, I had to adjust the following pieces of code:

In Net.forward() after line 135 I added the statement

is_max = torch.unsqueeze(is_max, dim=0)

In Net.__init__() change line 79 to prevent a dimension mismatch as follows:

self.directional_filter.weight.data.copy_(torch.from_numpy(all_filters[:, None, ...]))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.