Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ version = "0.2.6"
ColorBlendModes = "60508b50-96e1-4007-9d6c-f475c410f16b"
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
ImageDraw = "4381153b-2b60-58ae-a1ba-fd683676385f"
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -27,17 +27,17 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ColorBlendModes = "0.2"
CoordinateTransformations = "0.6"
Distributions = "0.24, 0.25"
ImageCore = "0.8, 0.9"
ImageDraw = "0.2"
ImageTransformations = "0.8"
Images = "0.23, 0.24, 0.25"
IndirectArrays = "0.5, 1"
Interpolations = "0.13"
MosaicViews = "0.2, 0.3"
OffsetArrays = "1.6.2"
OffsetArrays = "1"
Parameters = "0.12"
Rotations = "1.0"
Rotations = "1"
Setfield = "0.7, 0.8"
StaticArrays = "1.0"
StaticArrays = "1"
julia = "1.3, 1.4, 1.5"

[publish]
Expand Down
3 changes: 1 addition & 2 deletions src/DataAugmentation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using CoordinateTransformations
using Distributions: Sampleable, Uniform, Categorical
using IndirectArrays: IndirectArray
using ImageDraw
using Images
using Images: Colorant, permuteddimsview
using ImageCore
using ImageTransformations
using ImageTransformations: center, _center, box_extrapolation, warp!
using Interpolations
Expand Down
4 changes: 2 additions & 2 deletions src/preprocessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function apply!(buf, ::ImageToTensor, image::Image; randstate = nothing)
end

function imagetotensor(image::AbstractArray{C, N}, T = Float32) where {C<:Color, N}
T.(permuteddimsview(_channelview(image), ((i for i in 2:N+1)..., 1)))
T.(PermutedDimsArray(_channelview(image), ((i for i in 2:N+1)..., 1)))
end

#=
Expand Down Expand Up @@ -199,7 +199,7 @@ end

function tensortoimage(C::Type{<:Color}, a::AbstractArray{T, N}) where {T, N}
perm = (N, 1:N-1...)
return _colorview(C, permuteddimsview(a, perm))
return _colorview(C, PermutedDimsArray(a, perm))
end


Expand Down
2 changes: 1 addition & 1 deletion src/visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
function showkeypoint!(img, point::SVector{N}, C; sz = 3) where N
I = CartesianIndex(Tuple(round.(Int, point)))
offset = sz ÷ 2
Is = I-offset*one(CartesianIndex{N}):I+offset*one(CartesianIndex{N})
Is = I-offset*oneunit(CartesianIndex{N}):I+offset*oneunit(CartesianIndex{N})
img[Is[[checkbounds(Bool, img, I) for I in Is]]] .= C
end

Expand Down