Skip to content

Commit

Permalink
Merge pull request #2 from t13801206/fix-variable-name
Browse files Browse the repository at this point in the history
[fix-typo]variable name
  • Loading branch information
fuchami authored Jun 21, 2023
2 parents 6b0c5c7 + df0486a commit b685192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ def run(args):
#test_img = np.random.uniform(-1, 1 (args.imgsize, args.imgsize, args.channels))

start = cv2.getTickCount()
score, qurey, pred, diff = anomaly_detection(test_img, args)
score, query, pred, diff = anomaly_detection(test_img, args)
time = (cv2.getTickCount() - start ) / cv2.getTickFrequency() * 1000
#print ('%d label, %d : done ' %(label_idx, img_idx), '%.2f' %score, '%.2fms'%time)

""" matplot view """
plt.figure(1, figsize=(3, 3))
plt.title('query image')
plt.imshow(qurey.reshape(args.imgsize, args.imgsize), cmap=plt.cm.gray)
plt.imshow(query.reshape(args.imgsize, args.imgsize), cmap=plt.cm.gray)
plt.savefig('query_image.png' )

print('anomaly score :', score)
Expand Down

0 comments on commit b685192

Please sign in to comment.