Permalink
Browse files

Add support for .jpeg files

  • Loading branch information...
1 parent fab6fc5 commit 41f50947caea223d0e134cd496465d5e60ce7f34 @sanuj sanuj committed Dec 31, 2015
Showing with 3 additions and 4 deletions.
  1. +3 −4 misc/DataLoaderRaw.lua
@@ -1,5 +1,5 @@
--[[
-Same as DataLoader but only requires a folder of images.
+Same as DataLoader but only requires a folder of images.
Does not have an h5 dependency.
Only used at test time.
]]--
@@ -15,7 +15,7 @@ function DataLoaderRaw:__init(opt)
-- load the json file which contains additional information about the dataset
print('DataLoaderRaw loading images from folder: ', opt.folder_path)
-
+
self.files = {}
self.ids = {}
if string.len(opt.coco_json) > 0 then
@@ -31,7 +31,7 @@ function DataLoaderRaw:__init(opt)
-- read in all the filenames from the folder
print('listing all images in directory ' .. opt.folder_path)
local function isImage(f)
- local supportedExt = {'.jpg','.JPEG','.JPG','.png','.PNG','.ppm','.PPM'}
+ local supportedExt = {'.jpg','.JPG','.jpeg','.JPEG','.png','.PNG','.ppm','.PPM'}
for _,ext in pairs(supportedExt) do
local _, end_idx = f:find(ext)
if end_idx and end_idx == f:len() then
@@ -95,4 +95,3 @@ function DataLoaderRaw:getBatch(opt)
data.infos = infos
return data
end
-

0 comments on commit 41f5094

Please sign in to comment.