JuliaImages / ImageTracking.jl

Other
26 stars 8 forks source link

[WIP]Add flow evaluation functions #19

Closed Deepank308 closed 5 years ago

Deepank308 commented 5 years ago

Added end point error evaluation function. Currently, the function evaluates error iff ground truth flow is also provided as an array.

Deepank308 commented 5 years ago

@zygmuntszpak, I was searching for the standard methods for evaluations, I found out this. My doubt is : Is it a convention to use .flo file, in a standard widely accepted format(as in here), to store the ground truth flow vector or a user may directly pass the ground truth flow vector? Because I am not able to read from these .flo file in Julia.

I also referred to OpenCV contrib repository for some idea, they also end up using the .flo file for ground truth flow in the above specified format. So, I also tried to read these .flo file in Julia but couldn't, however in C++ I could.

I am still trying to successfully read the .flo files, once it's done will add a commit for the reading function.

codecov[bot] commented 5 years ago

Codecov Report

Merging #19 into master will decrease coverage by 3.17%. The diff coverage is 50.7%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
- Coverage    64.8%   61.62%   -3.18%     
==========================================
  Files           7        7              
  Lines         375      443      +68     
==========================================
+ Hits          243      273      +30     
- Misses        132      170      +38
Impacted Files Coverage Δ
src/ImageTracking.jl 100% <100%> (ø) :arrow_up:
src/utility.jl 46.57% <48.52%> (-40.93%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a83b91f...be59eb4. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #19 into master will decrease coverage by 1.84%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
- Coverage    64.8%   62.95%   -1.85%     
==========================================
  Files           7        7              
  Lines         375      386      +11     
==========================================
  Hits          243      243              
- Misses        132      143      +11
Impacted Files Coverage Δ
src/ImageTracking.jl 100% <ø> (ø) :arrow_up:
src/utility.jl 36.84% <0%> (-50.66%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a83b91f...71af507. Read the comment docs.

Deepank308 commented 5 years ago

@zygmuntszpak I have put the error evaluation functions in the same utility.jl. Or, should I keep seperately the flow visualization function and the error evaluation functions?

zygmuntszpak commented 5 years ago

@zygmuntszpak I have put the error evaluation functions in the same utility.jl. Or, should I keep seperately the flow visualization function and the error evaluation functions?

I reckon you can put it in utility.jl for now.

With regard to the ground truth, as far as I can tell we should allow the user to specify the ground truth flow as Array{SVector{2, Float64}, 2} and then work on a parser that can read the .flo file and convert it to Array{SVector{2, Float64}, 2}.

Deepank308 commented 5 years ago

@zygmuntszpak I haven't added the test function yet. Once, I am able to parse the .flo files I will add the test.

Deepank308 commented 5 years ago

The last commit adds following : 1) .flo file reading function 2) demo for error evaluation 3) test for error evaluation 4) cleans demo_franeback.jl - moving the error evaluation part to new demo_error_evaluation.jl file.

I have changed the name of evaluate_error function to evaluate_flow_error because there is an identically named function under test/franeback.jl and test/lucas_kanade.jl which was throwing error while running the tests.

@zygmuntszpak please review and suggest changes. Thank you

Deepank308 commented 5 years ago

I'm really sorry for being so late! I was drafting my GSoC proposal.

zygmuntszpak commented 5 years ago

I wonder if we shouldn't define an AbstractCoordinateConvention and then have RasterConvention and CartesianConvention as subtypes instead of using strings x_y and row_col. For example, we currently use strings to indicate the convention convention="row_col".

Deepank308 commented 5 years ago

@zygmuntszpak done

zygmuntszpak commented 5 years ago

Are the tests passing for you locally? I'm not sure why all of the builds have failed on Travis and Appveyor.

Deepank308 commented 5 years ago

What I think the error might be is, ImageTracking is not a part of the registered packages under Julia(at least it is not mentioned here). So, while testing it is throwing some error. The Project.toml doesn't has any name field for the package as in here.

zygmuntszpak commented 5 years ago

Ok, can you confirm that the tests pass on your machine? If so, then I will go ahead and merge and then work on a separate pull-request to register this package etc. I just want us to be reasonably confident that we don't commit broken code to the master branch.

Deepank308 commented 5 years ago

Yes, the tests are passing on my local machine.