Spaces:
Runtime error
Runtime error
Adhikary, Dhruba commited on
Commit ·
14aa10c
1
Parent(s): 9e1c065
push
Browse files
app.py
CHANGED
|
@@ -72,13 +72,13 @@ def inference(input_img, transparency = 0.5, target_layer_number = -1, top_predi
|
|
| 72 |
top_n_confidences = dict(list(sorted_confidences.items())[:top_predictions])
|
| 73 |
|
| 74 |
|
| 75 |
-
files = os.listdir('
|
| 76 |
|
| 77 |
# Plot the misclassified images
|
| 78 |
fig = plt.figure(figsize=(12, 5))
|
| 79 |
for i in range(miss_classified_images_count):
|
| 80 |
sub = fig.add_subplot(2, 5, i+1)
|
| 81 |
-
npimg = Image.open('
|
| 82 |
|
| 83 |
# Use regex to extract target and predicted classes
|
| 84 |
match = re.search(r'Target_(\w+)_Pred_(\w+)_\d+.jpeg', files[i])
|
|
|
|
| 72 |
top_n_confidences = dict(list(sorted_confidences.items())[:top_predictions])
|
| 73 |
|
| 74 |
|
| 75 |
+
files = os.listdir('misclassified_images/')
|
| 76 |
|
| 77 |
# Plot the misclassified images
|
| 78 |
fig = plt.figure(figsize=(12, 5))
|
| 79 |
for i in range(miss_classified_images_count):
|
| 80 |
sub = fig.add_subplot(2, 5, i+1)
|
| 81 |
+
npimg = Image.open('misclassified_images/' + files[i])
|
| 82 |
|
| 83 |
# Use regex to extract target and predicted classes
|
| 84 |
match = re.search(r'Target_(\w+)_Pred_(\w+)_\d+.jpeg', files[i])
|