Skip to content

Commit 36059da

Browse files
Merge pull request #7 from iuliancioarca/master
Fixed 'renderResult' by calling methods explicitly with the module name
2 parents 5b7095e + 5699be9 commit 36059da

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/datasets.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ function download_dataset(name::String = "all")
1414
voc_dir = joinpath(datasets_dir, "voc")
1515
voc_root = joinpath(voc_dir, "VOCdevkit")
1616
isdir(voc_root) && rm(voc_root, force = true, recursive = true)
17+
@info "Downloading dataset..."
1718
tmploc = download("https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar")
19+
@info "Extracting..."
1820
run(`tar xf $tmploc -C $voc_dir`)
21+
@info "Completed"
1922
end
2023
end

src/makierendering.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ function renderResult(img::Array{Float32}, predictions::Vector{YOLO.PredictLabel
88
img_w = settings.image_shape[1]
99
img_h = settings.image_shape[2]
1010
img_rgb = imgslice_to_rgbimg(img)
11-
scene = Scene(resolution = size(img_rgb') .* 2 )
12-
image!(scene, img_rgb, scale_plot=false, show_axis = false, limits = FRect(0, 0, img_h, img_w))
13-
rotate!(scene, -0.5pi)
11+
scene = Makie.Scene(resolution = size(img_rgb') .* 2 )
12+
Makie.image!(scene, img_rgb, scale_plot=false, show_axis = false, limits = Makie.FRect(0, 0, img_h, img_w))
13+
Makie.rotate!(scene, -0.5pi)
1414

1515
for p in predictions
1616
col = cols[p.class]
1717
rect = [p.bbox.y*img_h, p.bbox.x*img_w, p.bbox.h*img_h, p.bbox.w*img_w]
18-
poly!(scene, [Rectangle{Float32}(rect...)], color=RGBA(red(col),blue(col),green(col),clamp(p.conf*1.3,0.2,0.6)))
18+
Makie.poly!(scene, [Rectangle{Float32}(rect...)], color=RGBA(red(col),blue(col),green(col),clamp(p.conf*1.3,0.2,0.6)))
1919
name = get(settings.numsdic,p.class,"")
2020
conf_rounded = round(p.conf, digits=2)
21-
text!(scene, "$name\n$(conf_rounded)",
21+
Makie.text!(scene, "$name\n$(conf_rounded)",
2222
position = (rect[1], rect[2]),
2323
align = (:left, :top),
2424
colo = :black,

0 commit comments

Comments
 (0)