Closed annimesh2809 closed 7 years ago
Merging #2 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #2 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 95 150 +55
=====================================
+ Hits 95 150 +55
Impacted Files | Coverage Δ | |
---|---|---|
src/region_growing.jl | 100% <100%> (ø) |
:arrow_up: |
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 4233ca9...4e9bf68. Read the comment docs.
Merging #2 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #2 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 95 155 +60
=====================================
+ Hits 95 155 +60
Impacted Files | Coverage Δ | |
---|---|---|
src/region_growing.jl | 100% <100%> (ø) |
:arrow_up: |
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 4233ca9...4e9bf68. Read the comment docs.
The performance has increased significantly after these changes. Here are some benchmarks on standard testimages.
julia> using TestImages, Images, BenchmarkTools, ImageSegmentation;
julia> img = testimage("camera");
julia> summary(img)
"512×512 Array{Gray{N0f8},2}"
julia> @benchmark unseeded_region_growing(img, 0.23, [5,5])
BenchmarkTools.Trial:
memory estimate: 13.21 MiB
allocs estimate: 95
--------------
minimum time: 605.234 ms (0.00% GC)
median time: 611.179 ms (0.24% GC)
mean time: 622.737 ms (0.13% GC)
maximum time: 674.381 ms (0.00% GC)
--------------
samples: 9
evals/sample: 1
Output:
julia> img = testimage("house");
julia> summary(img)
"512×512 Array{GrayA{N0f8},2}"
julia> @benchmark unseeded_region_growing(img, 0.1)
BenchmarkTools.Trial:
memory estimate: 11.84 MiB
allocs estimate: 86
--------------
minimum time: 457.768 ms (0.00% GC)
median time: 468.675 ms (0.00% GC)
mean time: 471.216 ms (0.06% GC)
maximum time: 491.004 ms (0.12% GC)
--------------
samples: 11
evals/sample: 1
Output:
For smaller images, the algorithm takes only about 100ms.
I do not understand the terms memory estimate
and allocs estimate
clearly. Can you please explain.
Nice!
I do not understand the terms memory estimate and allocs estimate clearly. Can you please explain.
I think they mean "the amount of memory" and "the number of separate allocation events" respectively. If you allocate one big matrix, it might be a lot of memory but only one allocation event.
LGTM. Merge when ready.
:fireworks:
An implementation of the unseeded region growing algorithm. The API is consistent with the SRG algorithm and output is also of type
SegmentedImage
. It supports N-dimensional arrays with arbitrary indices. Similar to SRG, it can take custom neighborhood as aFunction
as well asUnion{Vector{Int}, NTuple{N, Int}}
. Tests and docstring have been added.The color of the ith segment corresponds to
segment_means[i]
.