@@ -99,7 +99,9 @@ include("../imports.jl")
9999 tfm = Rotate (10 )
100100 image = Image (rand (RGB, 50 , 50 ))
101101 @test_nowarn apply (tfm, image)
102-
102+ P = DataAugmentation. getprojection (tfm, getbounds (image))
103+ @test P isa AffineMap
104+ @test P. linear. mat[1 ] isa Float32
103105 end
104106
105107 @testset ExtendedTestSet " Rotate" begin
@@ -144,16 +146,20 @@ end
144146 Image (rand (RGB, sz)),
145147 Keypoints (rand (SVector{2 , Float32}, 50 ), sz),
146148 MaskBinary (rand (Bool, sz)),
147- MaskMulti (rand (1 : 8 , sz)),
149+ MaskMulti (UInt8 .( rand (1 : 8 , sz)), 1 : 8 ),
148150 )
149151
150152 tfms = compose (
151153 Rotate (10 ),
152154 FlipX (), FlipY (),
153155 ScaleRatio ((.8 , .8 )),
154156 RandomResizeCrop ((50 , 50 )),
157+ WarpAffine (0.1 ),
158+ Zoom ((1. , 1.2 ))
155159 )
156160 @test_nowarn apply (tfms, items)
161+ titems = apply (tfms, items)
162+ @test all (typeof .(titems) == typeof .(items))
157163 end
158164
159165 @testset ExtendedTestSet " 3D" begin
170176 RandomResizeCrop ((25 , 25 , 25 )),
171177 )
172178 @test_nowarn apply (tfms, items)
179+ titems = apply (tfms, items)
180+ @test all (typeof .(titems) == typeof .(items))
173181 end
174182end
0 commit comments