File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 37
37
#mkdir ('scanned')
38
38
39
39
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 ()
41
42
42
- print join ( var_path , image_file )
43
+ print src_image_path
43
44
predictions = sess .run (softmax_tensor , \
44
45
{'DecodeJpeg/contents:0' : image_data })
45
46
49
50
50
51
new_file_name = label_lines [firstElt ] + '--' + str (predictions [0 ][firstElt ])[2 :7 ]+ '.jpg'
51
52
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 ))
53
54
54
55
for node_id in top_k :
55
56
human_string = label_lines [node_id ]
You can’t perform that action at this time.
0 commit comments