Skip to content

Commit

Permalink
test fixed readying early release
Browse files Browse the repository at this point in the history
  • Loading branch information
casey kneale committed Mar 29, 2020
1 parent 20ee6ea commit 95e17e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ImageChipper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module ImageChipper
IoU_threshold::Float64 = 0.0,
clamp_to_chip::Bool = false )
width, height = size( img )
clamp_box = ObjectDetectionScore.box( 1, 1, width, height )
clamp_box = ObjectDetectionStats.Box( 1, 1, width, height )
chips = Int.( ceil.( [ width, height ] ./ chip_size ) ) #.+ 1
overlap_factor = chip_size
if overlap != ( 0.0, 0.0 )
Expand All @@ -77,12 +77,10 @@ module ImageChipper
chip_box = ObjectDetectionStats.Box( first(X), first(Y), last(X), last(Y) )

if clamp_to_chip
postprocess(x) = translate(x, -first(X), -first(Y) )
boxes_in_chip[ chip_count ] = [ ( i, translate(box, -first(X), -first(Y) ) ) for (i, box) in enumerate( boxes )
if intersection_over_union(chip_box, box) > IoU_threshold ]
else
postprocess(x) = clamp( translate(box, -first(X), -first(Y) ), clamp_box )
boxes_in_chip[ chip_count ] = [ ( i, postprocess( box ) ) for (i, box) in enumerate( boxes )
boxes_in_chip[ chip_count ] = [ ( i, ObjectDetectionStats.clamp( translate(box, -first(X), -first(Y) ), clamp_box ) ) for (i, box) in enumerate( boxes )
if intersection_over_union(chip_box, box) > IoU_threshold ]
end

Expand Down

0 comments on commit 95e17e2

Please sign in to comment.