Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix ssim world age issue #52

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented Jul 15, 2022

on master:

using ImageQualityIndexes
foo() = assess_ssim(rand(64, 64), rand(64, 64))
foo()
ERROR: MethodError: no method matching length(::ImageFiltering.KernelFactors.ReshapedOneD{Float64, 2, 0, OffsetArrays.OffsetVector{Float64, Vector{Float64}}})
The applicable method may be too new: running in world age 32409, while current world is 32421.
Closest candidates are:
  length(::ImageFiltering.KernelFactors.ReshapedOneD{T, N, Npre, V} where {T, N, Npre, V<:(AbstractVector)}) at ~/.julia/packages/ImageFiltering/cs86y/src/imfilter.jl:1558 (method too new to be called from this world context.)
  length(::Union{Base.KeySet, Base.ValueIterator}) at abstractdict.jl:58
  length(::Union{DataStructures.OrderedRobinDict, DataStructures.RobinDict}) at ~/.julia/packages/DataStructures/59MD0/src/ordered_robin_dict.jl:86 (method too new to be called from this world context.)
  ...
Stacktrace:
  [1] (::ImageQualityIndexes.var"#9#10")(w::ImageFiltering.KernelFactors.ReshapedOneD{Float64, 2, 0, OffsetArrays.OffsetVector{Float64, Vector{Float64}}}, a::Base.OneTo{Int64})
    @ ImageQualityIndexes ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:176
  [2] map(f::ImageQualityIndexes.var"#9#10", t::Tuple{ImageFiltering.KernelFactors.ReshapedOneD{Float64, 2, 0, OffsetArrays.OffsetVector{Float64, Vector{Float64}}}, ImageFiltering.KernelFactors.ReshapedOneD{Float64, 2, 1, OffsetArrays.OffsetVector{Float64, Vector{Float64}}}}, s::Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}})
    @ Base ./tuple.jl:247
  [3] _ssim_statistics(x::Matrix{Float64}, ref::Matrix{Float64}, window::OffsetArrays.OffsetVector{Float64, Vector{Float64}}; crop::Bool)
    @ ImageQualityIndexes ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:175
  [4] __ssim_map_fast(x::Matrix{Float64}, ref::Matrix{Float64}, window::OffsetArrays.OffsetVector{Float64, Vector{Float64}}, C₁::Float64, C₂::Float64; crop::Bool)
    @ ImageQualityIndexes ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:151
  [5] _ssim_map(iqi::SSIM{OffsetArrays.OffsetVector{Float64, Vector{Float64}}}, x::Matrix{Float64}, ref::Matrix{Float64}, peakval::Float64, K::Tuple{Float64, Float64})
    @ ImageQualityIndexes ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:122
  [6] _ssim_map
    @ ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:105 [inlined]
  [7] (::SSIM{OffsetArrays.OffsetVector{Float64, Vector{Float64}}})(x::Matrix{Float64}, ref::Matrix{Float64})
    @ ImageQualityIndexes ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:85
  [8] #assess_ssim#5
    @ ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:88 [inlined]
  [9] assess_ssim
    @ ~/Documents/Julia/ImageQualityIndexes.jl/src/ssim.jl:88 [inlined]
 [10] foo()
    @ Main ./REPL[2]:1
 [11] top-level scope
    @ REPL[3]:1

Will bump a new patch release for this ASAP

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #52 (987d7c0) into master (13c73c3) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   96.70%   96.70%           
=======================================
  Files           7        7           
  Lines         182      182           
=======================================
  Hits          176      176           
  Misses          6        6           
Impacted Files Coverage Δ
src/ssim.jl 100.00% <100.00%> (ø)

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 13c73c3...987d7c0. Read the comment docs.

@johnnychen94 johnnychen94 merged commit 68e619d into master Jul 15, 2022
@johnnychen94 johnnychen94 deleted the jc/world_age_issue branch July 15, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant