Skip to content

Commit b98466e

Browse files
authored
Merge branch 'master' into compathelper/new_version/2021-08-20-01-00-46-675-00424368885
2 parents 4bbd097 + e189bb7 commit b98466e

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

Project.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name = "DataAugmentation"
22
uuid = "88a5189c-e7ff-4f85-ac6b-e6158070f02e"
33
authors = ["lorenzoh <lorenz.ohly@gmail.com>"]
4-
version = "0.2.6"
4+
version = "0.2.8"
55

66
[deps]
77
ColorBlendModes = "60508b50-96e1-4007-9d6c-f475c410f16b"
88
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
99
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
10+
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
1011
ImageDraw = "4381153b-2b60-58ae-a1ba-fd683676385f"
1112
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
12-
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
1313
IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959"
1414
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
1515
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -27,17 +27,17 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2727
ColorBlendModes = "0.2"
2828
CoordinateTransformations = "0.6"
2929
Distributions = "0.24, 0.25"
30+
ImageCore = "0.8, 0.9"
3031
ImageDraw = "0.2"
3132
ImageTransformations = "0.8, 0.9"
32-
Images = "0.23, 0.24"
3333
IndirectArrays = "0.5, 1"
3434
Interpolations = "0.13"
3535
MosaicViews = "0.2, 0.3"
36-
OffsetArrays = "1.6.2"
36+
OffsetArrays = "1"
3737
Parameters = "0.12"
38-
Rotations = "1.0"
38+
Rotations = "1"
3939
Setfield = "0.7, 0.8"
40-
StaticArrays = "1.0"
40+
StaticArrays = "1"
4141
julia = "1.3, 1.4, 1.5"
4242

4343
[publish]

src/DataAugmentation.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ using CoordinateTransformations
55
using Distributions: Sampleable, Uniform, Categorical
66
using IndirectArrays: IndirectArray
77
using ImageDraw
8-
using Images
9-
using Images: Colorant, permuteddimsview
8+
using ImageCore
109
using ImageTransformations
1110
using ImageTransformations: center, _center, box_extrapolation, warp!
1211
using Interpolations

src/preprocessing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function apply!(buf, ::ImageToTensor, image::Image; randstate = nothing)
166166
end
167167

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

172172
#=
@@ -199,7 +199,7 @@ end
199199

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

205205

src/visualization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end
5959
function showkeypoint!(img, point::SVector{N}, C; sz = 3) where N
6060
I = CartesianIndex(Tuple(round.(Int, point)))
6161
offset = sz ÷ 2
62-
Is = I-offset*one(CartesianIndex{N}):I+offset*one(CartesianIndex{N})
62+
Is = I-offset*oneunit(CartesianIndex{N}):I+offset*oneunit(CartesianIndex{N})
6363
img[Is[[checkbounds(Bool, img, I) for I in Is]]] .= C
6464
end
6565

0 commit comments

Comments
 (0)