Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Aug 28, 2022
1 parent 7fa410f commit 6166ef6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ImageQuilting"
uuid = "e8712464-036d-575c-85ac-952ae31322ab"
author = "Júlio Hoffimann <[email protected]>"
version = "0.18.3"
version = "0.18.4"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -25,12 +25,12 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
CUDA = "3.11"
CpuId = "0.2, 0.3"
FFTW = "1.0"
GeoStatsBase = "0.26, 0.27"
GeoStatsBase = "0.28"
Graphs = "1.4"
GraphsFlows = "0.1"
ImageFiltering = "0.6, 0.7"
ImageMorphology = "0.2, 0.3, 0.4"
Meshes = "0.22, 0.23, 0.24"
Meshes = "0.24"
ProgressMeter = "1.1"
RecipesBase = "1.0"
StatsBase = "0.32, 0.33"
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
GeoStatsBase = "323cb8eb-fbf6-51c0-afd0-f8fba70507b2"
GeoStatsImages = "7cd16168-b42c-5e7d-a585-4f59d326662d"
GeoStatsPlots = "cf22561b-6452-4701-9483-6c69015d00e1"
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
MeshPlots = "de9684d3-f81f-49d9-ae9e-c828b202dea9"
Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
Binary file modified test/data/GeoStatsAPI-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/data/RealsStrebelle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions test/lowapi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,14 @@ end

if CUDA.functional()
@testset "CPU vs GPU" begin
tolerance = 1e-5

# 2D imfilter
img = rand(200, 100)
krn = rand(30, 10)

result_cpu = ImageQuilting.imfilter_cpu(img, krn)
result_gpu = ImageQuilting.imfilter_gpu(CuArray(img), krn)
@test size(result_cpu) == size(result_gpu)
@test isapprox(result_cpu[:], result_gpu[:], atol=tolerance)
@test isapprox(result_cpu[:], result_gpu[:], atol=1e-2)

# 3D imfilter
img = rand(50, 100, 150)
Expand All @@ -162,6 +160,6 @@ if CUDA.functional()
result_cpu = ImageQuilting.imfilter_cpu(img, krn)
result_gpu = ImageQuilting.imfilter_gpu(CuArray(img), krn)
@test size(result_cpu) == size(result_gpu)
@test isapprox(result_cpu[:], result_gpu[:], atol=tolerance)
@test isapprox(result_cpu[:], result_gpu[:], atol=1e-1)
end
end
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using ImageFiltering
using Statistics
using CUDA
using Plots; gr(size=(600,400))
using MeshPlots # TODO: replace by MeshViz
using GeoStatsPlots # TODO: replace by GeoStatsViz
using ReferenceTests, ImageIO
using Test, Random

Expand Down

2 comments on commit 6166ef6

@juliohm
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/67228

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.18.4 -m "<description of version>" 6166ef6b1905029d08ff9dcbd91a429c271089ba
git push origin v0.18.4

Please sign in to comment.