Siddharth Maddali
commited on
Commit
β’
abee87a
1
Parent(s):
bc9772f
More test images, tweak description
Browse files- 070466c3958b16d81425f8d545e419058929abd8fc704b9da7ca3a88f2411501.jpg +0 -0
- 348b246f1771fce345f9aeb7f4aa7bf1dc927359809228a417a477360dbb46fa.jpg +0 -0
- 9687263544023498279387456293482342.jpg β 3a49e617f3c4bcdb26048ad95f503cfe5ce12e87833d5c970ea7b72933991943.jpg +0 -0
- 410e1323d2beec27ad0608b694787747baa008d22025ec0108b1259b6e4383e2.jpg +0 -0
- 2348976234782938476192387162319.jpg β 48880300f7f1f7ab4cffaee3f32cd446a87ea6be656b49ae0b238c28e37439fd.jpg +0 -0
- a308c297d4943599a49ca449abf7851b7033e6e5c107968971a3c21c12ecc273.jpg +0 -0
- app.py +7 -3
- 03987623409862737409280474529876.jpg β e07e52b3117daca607b08889598db5b70bbcd67b6be8b81b81bbae9f66a64b58.jpg +0 -0
- 2498756234958762345238495823745624759.jpg β e5a6d6b1e591c3557301df13f2f1acfc56fb52c23b10b47d5b5ca3a2f7e5a2f5.jpg +0 -0
- e71e00cf3674f5536ffb1998619582cb38e2408ad1c9678b91a0bb3c356ae4f7.jpg +0 -0
- ef4f6e3adad50a619eef33090eea3f737ef99b4df2e2839399f4ff6ccbbcd58e.jpg +0 -0
070466c3958b16d81425f8d545e419058929abd8fc704b9da7ca3a88f2411501.jpg
ADDED
![]() |
348b246f1771fce345f9aeb7f4aa7bf1dc927359809228a417a477360dbb46fa.jpg
ADDED
![]() |
9687263544023498279387456293482342.jpg β 3a49e617f3c4bcdb26048ad95f503cfe5ce12e87833d5c970ea7b72933991943.jpg
RENAMED
File without changes
|
410e1323d2beec27ad0608b694787747baa008d22025ec0108b1259b6e4383e2.jpg
ADDED
![]() |
2348976234782938476192387162319.jpg β 48880300f7f1f7ab4cffaee3f32cd446a87ea6be656b49ae0b238c28e37439fd.jpg
RENAMED
File without changes
|
a308c297d4943599a49ca449abf7851b7033e6e5c107968971a3c21c12ecc273.jpg
ADDED
![]() |
app.py
CHANGED
@@ -41,7 +41,7 @@ def create_plots( output_tensor, title, fontsize=24 ):
|
|
41 |
img_list = [ output_tensor[0][n].detach().numpy() for n in range( output_tensor.shape[1] ) ]
|
42 |
fig = plt.figure()
|
43 |
M, N = get_best_layout( len( img_list ), img_list[0].shape )
|
44 |
-
ax = fig.subplots( M, N
|
45 |
for N0, img in enumerate( img_list ):
|
46 |
m = N0//N
|
47 |
n = N0%N
|
@@ -82,9 +82,13 @@ model = learn.model.eval()
|
|
82 |
description='''
|
83 |
A simple 4-way classifier that categorizes images as 'snake', 'bird', 'otter' or 'forest'.
|
84 |
Refined from an initial ResNet18 model downloaded from HuggingFace.
|
|
|
85 |
|
86 |
-
|
87 |
-
and
|
|
|
|
|
|
|
88 |
'''
|
89 |
|
90 |
# with gr.Blocks() as layout:
|
|
|
41 |
img_list = [ output_tensor[0][n].detach().numpy() for n in range( output_tensor.shape[1] ) ]
|
42 |
fig = plt.figure()
|
43 |
M, N = get_best_layout( len( img_list ), img_list[0].shape )
|
44 |
+
ax = fig.subplots( M, N )
|
45 |
for N0, img in enumerate( img_list ):
|
46 |
m = N0//N
|
47 |
n = N0%N
|
|
|
82 |
description='''
|
83 |
A simple 4-way classifier that categorizes images as 'snake', 'bird', 'otter' or 'forest'.
|
84 |
Refined from an initial ResNet18 model downloaded from HuggingFace.
|
85 |
+
The test images given here are chosen to demonstrate the effect of lack of training data on the classification outcome.
|
86 |
|
87 |
+
The actual classification for each test image actually takes a very short time; the delay in predicing results here is due to
|
88 |
+
the extra step of platting the intermediate activation maps and inferred features in `matplotlib`.
|
89 |
+
|
90 |
+
|
91 |
+
**DISCLAIMER**: the images here are merely for demonstration purposes. I don't own any of them and I'm not making money from them.
|
92 |
'''
|
93 |
|
94 |
# with gr.Blocks() as layout:
|
03987623409862737409280474529876.jpg β e07e52b3117daca607b08889598db5b70bbcd67b6be8b81b81bbae9f66a64b58.jpg
RENAMED
File without changes
|
2498756234958762345238495823745624759.jpg β e5a6d6b1e591c3557301df13f2f1acfc56fb52c23b10b47d5b5ca3a2f7e5a2f5.jpg
RENAMED
File without changes
|
e71e00cf3674f5536ffb1998619582cb38e2408ad1c9678b91a0bb3c356ae4f7.jpg
ADDED
![]() |
ef4f6e3adad50a619eef33090eea3f737ef99b4df2e2839399f4ff6ccbbcd58e.jpg
ADDED
![]() |