Skip to content

Commit 55722cb

Browse files
committed
Use var for src_image_path
1 parent 5eee27d commit 55722cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/py/label_dir.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
#mkdir ('scanned')
3838

3939
for image_file in img_files:
40-
image_data = tf.gfile.FastGFile(join(var_path, image_file), 'rb').read()
40+
src_image_path = join(var_path, image_file)
41+
image_data = tf.gfile.FastGFile(src_image_path, 'rb').read()
4142

42-
print join(var_path, image_file)
43+
print src_image_path
4344
predictions = sess.run(softmax_tensor, \
4445
{'DecodeJpeg/contents:0': image_data})
4546

@@ -49,7 +50,7 @@
4950

5051
new_file_name = label_lines[firstElt] +'--'+ str(predictions[0][firstElt])[2:7]+'.jpg'
5152
print(new_file_name)
52-
copyfile(join(var_path, image_file), join(dest_dir, new_file_name))
53+
copyfile(src_image_path, join(dest_dir, new_file_name))
5354

5455
for node_id in top_k:
5556
human_string = label_lines[node_id]

0 commit comments

Comments
 (0)