Skip to content

Commit

Permalink
mod
Browse files Browse the repository at this point in the history
  • Loading branch information
hitokun-s committed Apr 2, 2016
1 parent d3e38de commit 22c6c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imagenet/food_hack/resize_and_compute_mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
os.remove("train.txt")
f = open("train.txt","w")
for fileName in os.listdir(train_image_dir):
image_id = fileName[:fileName.index(".")]
image_id = fileName[:fileName.index("_box")]
if image_id in targets:
print "find target!:%s" % fileName
classIdx = targets.index(image_id)
f.write((train_image_dir + "%s %d") % (fileName, classIdx) + "\n")
f.close()
Expand Down

0 comments on commit 22c6c8a

Please sign in to comment.