Code Monkey home page Code Monkey logo

Comments (10)

timholy avatar timholy commented on July 4, 2024 1

Sometimes you do have to change the test values when algorithms update. In JuliaImages/Images.jl#596 I found a test that essentially "froze in" the exact behavior of the algorithm we'd had before, rather than more broadly testing "sensible behavior." The tricky part is that sometimes it's pretty hard to define "sensible."

@annimesh2809, I'd say begin by commenting out failing tests and then we can discuss.

from imagefeatures.jl.

timholy avatar timholy commented on July 4, 2024 1

The most expedient approach is to call parent on the OffsetArray; that will return a conventionally-indexed array. In the longer run, non-1 indices allow you to express filtering operations easily with clearer intent; there's a WIP blog post here.

from imagefeatures.jl.

mronian avatar mronian commented on July 4, 2024

Are there other test failures too?

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

@mronian Sorry I did not see your comment so didn't reply sooner.

I have fixed some warnings and I have printed the value returned by the algorithm and the expected value of a test case.

screenshot from 2017-03-04 19 44 37

The failing test case is at line 55 of /test/brief.jl.
What to do with this test case?

from imagefeatures.jl.

mronian avatar mronian commented on July 4, 2024

Its a very simple test case which is already covered by the ones after it in the Descriptor Calculation part. You can comment it out for now. I'll submit a modification.

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

Another failing test on line 253 and 259 of file /test/lbp.jl. Both the results of "Descriptor" are different from expected value. Here is a screenshot of the test failure and the returned vs expected value:

img

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

Initial tests in test/corner.jl call the corner_orientations(img::AbstractArray) function from line 49, ImageFeatures/src/corner.jl. Here the function Kernel.gaussian (previously gaussian2d) is called from line 134, ImageFiltering/src/kernel.jl which calls KernelFactors.gaussian from line 269, ImageFiltering/kernelfactors.jl and returns an object of type OffsetArray by a call to centered from line 14, ImageFiltering/src/utils.jl. The problem arises due to the fact that the function
corner_orientations(img::AbstractArray{T, 2}, corners::Keypoints, kernel::Array{K, 2})
(Line 16, ImageFeatures/src/corner.jl) which is called after creating the kernel by the above process must have kernel of type Array{K,2} but the kernel is of type OffsetArray. Hence a MethodError occurs:

img2

Should I write a function to convert the OffsetArray to Array{K,2} in corner_orientations or should I write another version of centered function to return an Array instead of OffsetArray? Please suggest.

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

All warnings have been removed. Only 4 failing test cases remain. 😄

al_su

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

Only 2 test case failures remain which are present in LBP as mentioned in #24 (comment). These tests cannot be removed as it can lead to decrease in coverage. Kindly suggest what to do.

from imagefeatures.jl.

annimesh2809 avatar annimesh2809 commented on July 4, 2024

I commented out the 2 failing test cases and then tried doing a coverage test but travis failed stating that some tests were taking too much time. Indeed the tests for "orb.jl" were taking too much time (> 30 mins) so I commented that too and got a coverage of about 88%, with all orb.jl tests and some lbp.jl tests turned off.
https://coveralls.io/github/annimesh2809/ImageFeatures.jl

Should I remove the "Descriptor" tests of lbp that are failing for now?

from imagefeatures.jl.

Related Issues (20)

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.