Skip to content

Commit

Permalink
Merge 6c8e4e9 into f1944fd
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Sep 19, 2019
2 parents f1944fd + 6c8e4e9 commit b4718eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/YOLO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ Base.@kwdef mutable struct Settings
end

Base.@kwdef mutable struct LoadedDataset
imstack_mat::Array{Float32} #4D image stack of type Float32 (w,h,colorchannels,numimages)
imstack_mat::xtype #4D image stack of type Float32 (w,h,colorchannels,numimages)
paddings::Vector{Array{Int}}
labels::Vector{Vector{TruthLabel}}
#label #labels as tupple of arrays. tupples are designed as (ImageWidth, ImageHeight,[x,y,objectWidth,objectHeight],[x,y,objectWidth,objectHeight]..)
end


include("datasets.jl")
include("pretrained.jl")
include("models.jl")
Expand Down
16 changes: 5 additions & 11 deletions src/preprocess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,12 @@ function load(
settings,
)
imgsize = size(firstimg)

lds = LoadedDataset(
imstack_mat = Array{Float32}(
undef,
imgsize[1],
imgsize[2],
settings.image_channels,
numimages,
),
paddings = Vector{Vector{Int}}(undef, 0),
labels = ds.labels[indexes],
)
imstack_mat = xtype(undef,imgsize[1],imgsize[2],settings.image_channels,numimages),
paddings = Vector{Vector{Int}}(undef, 0),
labels = ds.labels[indexes],
)

j = 1
ProgressMeter.@showprogress 2 "Loading images..." for i in indexes
img = FileIO.load(ds.image_paths[i])
Expand Down

0 comments on commit b4718eb

Please sign in to comment.