Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
@@ -10,4 +10,387 @@ pinned: false
|
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
+
# Gradio Object Detection App with GradCAM for YOLOv3 - ERAv1 Session 13
|
14 |
+
|
15 |
+
## Table of Contents
|
16 |
+
- [Introduction](#introduction)
|
17 |
+
- [Features](#features)
|
18 |
+
- [Model Performance](#model-performance)
|
19 |
+
- [Inference Samples](#inference-samples)
|
20 |
+
- [How to Use](#how-to-use)
|
21 |
+
- [Supported Classes](#supported-classes)
|
22 |
+
- [Link to the Model](#link-to-the-model)
|
23 |
+
- [Acknowledgements](#acknowledgements)
|
24 |
+
|
25 |
+
## Introduction
|
26 |
+
This Gradio app showcases an object detection model using YOLOv3 architecture. The model is trained with enhanced features like multi-resolution training and Mosaic Augmentation. Additionally, the app provides GradCAM outputs for better visualization of the model's predictions.
|
27 |
+
|
28 |
+
## Features
|
29 |
+
- **PytorchLightning Implementation**: The codebase has been refactored to use PytorchLightning for a more modular and scalable approach.
|
30 |
+
- **Multi-resolution Training**: Unlike traditional models that train on a fixed resolution, this model has been trained on multiple resolutions (416, 608, 896, 1280) for better generalization.
|
31 |
+
- **Mosaic Augmentation**: Implemented Mosaic Augmentation to enhance the training dataset, but only applied 75% of the time to maintain variety.
|
32 |
+
- **Precision Training**: The model is trained using float16 precision for faster convergence and reduced memory usage.
|
33 |
+
- **GradCAM Visualization**: Integrated GradCAM to provide a heatmap visualization of the regions in the image that the model focuses on during prediction.
|
34 |
+
|
35 |
+
## Model Performance
|
36 |
+
```
|
37 |
+
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
38 |
+
┃ Validate metric ┃ DataLoader 0 ┃
|
39 |
+
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
40 |
+
│ val_class_accuracy_epoch │ 81.89761352539062 │
|
41 |
+
│ val_loss │ 6.100630283355713 │
|
42 |
+
│ val_no_obj_accuracy_epoch │ 97.92534637451172 │
|
43 |
+
│ val_obj_accuracy_epoch │ 71.2684097290039 │
|
44 |
+
└───────────────────────────┴───────────────────────────┘
|
45 |
+
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 619/619 [29:42<00:00, 2.88s/it]
|
46 |
+
MAP: 0.10860311985015869
|
47 |
+
```
|
48 |
+
## Inference Samples
|
49 |
+

|
50 |
+

|
51 |
+
|
52 |
+
## How to Use
|
53 |
+
1. Navigate to the Gradio app interface.
|
54 |
+
2. Upload a custom image or select from the provided samples.
|
55 |
+
3. Click on the "Predict" button.
|
56 |
+
4. View the object detection predictions along with the GradCAM heatmap.
|
57 |
+
|
58 |
+
## Supported Classes
|
59 |
+

|
60 |
+
|
61 |
+
## Model Architecture
|
62 |
+
```
|
63 |
+
----------------------------------------------------------------
|
64 |
+
Layer (type) Output Shape Param #
|
65 |
+
================================================================
|
66 |
+
Conv2d-1 [-1, 32, 416, 416] 864
|
67 |
+
BatchNorm2d-2 [-1, 32, 416, 416] 64
|
68 |
+
LeakyReLU-3 [-1, 32, 416, 416] 0
|
69 |
+
CNNBlock-4 [-1, 32, 416, 416] 0
|
70 |
+
Conv2d-5 [-1, 64, 208, 208] 18,432
|
71 |
+
BatchNorm2d-6 [-1, 64, 208, 208] 128
|
72 |
+
LeakyReLU-7 [-1, 64, 208, 208] 0
|
73 |
+
CNNBlock-8 [-1, 64, 208, 208] 0
|
74 |
+
Conv2d-9 [-1, 32, 208, 208] 2,048
|
75 |
+
BatchNorm2d-10 [-1, 32, 208, 208] 64
|
76 |
+
LeakyReLU-11 [-1, 32, 208, 208] 0
|
77 |
+
CNNBlock-12 [-1, 32, 208, 208] 0
|
78 |
+
Conv2d-13 [-1, 64, 208, 208] 18,432
|
79 |
+
BatchNorm2d-14 [-1, 64, 208, 208] 128
|
80 |
+
LeakyReLU-15 [-1, 64, 208, 208] 0
|
81 |
+
CNNBlock-16 [-1, 64, 208, 208] 0
|
82 |
+
ResidualBlock-17 [-1, 64, 208, 208] 0
|
83 |
+
Conv2d-18 [-1, 128, 104, 104] 73,728
|
84 |
+
BatchNorm2d-19 [-1, 128, 104, 104] 256
|
85 |
+
LeakyReLU-20 [-1, 128, 104, 104] 0
|
86 |
+
CNNBlock-21 [-1, 128, 104, 104] 0
|
87 |
+
Conv2d-22 [-1, 64, 104, 104] 8,192
|
88 |
+
BatchNorm2d-23 [-1, 64, 104, 104] 128
|
89 |
+
LeakyReLU-24 [-1, 64, 104, 104] 0
|
90 |
+
CNNBlock-25 [-1, 64, 104, 104] 0
|
91 |
+
Conv2d-26 [-1, 128, 104, 104] 73,728
|
92 |
+
BatchNorm2d-27 [-1, 128, 104, 104] 256
|
93 |
+
LeakyReLU-28 [-1, 128, 104, 104] 0
|
94 |
+
CNNBlock-29 [-1, 128, 104, 104] 0
|
95 |
+
Conv2d-30 [-1, 64, 104, 104] 8,192
|
96 |
+
BatchNorm2d-31 [-1, 64, 104, 104] 128
|
97 |
+
LeakyReLU-32 [-1, 64, 104, 104] 0
|
98 |
+
CNNBlock-33 [-1, 64, 104, 104] 0
|
99 |
+
Conv2d-34 [-1, 128, 104, 104] 73,728
|
100 |
+
BatchNorm2d-35 [-1, 128, 104, 104] 256
|
101 |
+
LeakyReLU-36 [-1, 128, 104, 104] 0
|
102 |
+
CNNBlock-37 [-1, 128, 104, 104] 0
|
103 |
+
ResidualBlock-38 [-1, 128, 104, 104] 0
|
104 |
+
Conv2d-39 [-1, 256, 52, 52] 294,912
|
105 |
+
BatchNorm2d-40 [-1, 256, 52, 52] 512
|
106 |
+
LeakyReLU-41 [-1, 256, 52, 52] 0
|
107 |
+
CNNBlock-42 [-1, 256, 52, 52] 0
|
108 |
+
Conv2d-43 [-1, 128, 52, 52] 32,768
|
109 |
+
BatchNorm2d-44 [-1, 128, 52, 52] 256
|
110 |
+
LeakyReLU-45 [-1, 128, 52, 52] 0
|
111 |
+
CNNBlock-46 [-1, 128, 52, 52] 0
|
112 |
+
Conv2d-47 [-1, 256, 52, 52] 294,912
|
113 |
+
BatchNorm2d-48 [-1, 256, 52, 52] 512
|
114 |
+
LeakyReLU-49 [-1, 256, 52, 52] 0
|
115 |
+
CNNBlock-50 [-1, 256, 52, 52] 0
|
116 |
+
Conv2d-51 [-1, 128, 52, 52] 32,768
|
117 |
+
BatchNorm2d-52 [-1, 128, 52, 52] 256
|
118 |
+
LeakyReLU-53 [-1, 128, 52, 52] 0
|
119 |
+
CNNBlock-54 [-1, 128, 52, 52] 0
|
120 |
+
Conv2d-55 [-1, 256, 52, 52] 294,912
|
121 |
+
BatchNorm2d-56 [-1, 256, 52, 52] 512
|
122 |
+
LeakyReLU-57 [-1, 256, 52, 52] 0
|
123 |
+
CNNBlock-58 [-1, 256, 52, 52] 0
|
124 |
+
Conv2d-59 [-1, 128, 52, 52] 32,768
|
125 |
+
BatchNorm2d-60 [-1, 128, 52, 52] 256
|
126 |
+
LeakyReLU-61 [-1, 128, 52, 52] 0
|
127 |
+
CNNBlock-62 [-1, 128, 52, 52] 0
|
128 |
+
Conv2d-63 [-1, 256, 52, 52] 294,912
|
129 |
+
BatchNorm2d-64 [-1, 256, 52, 52] 512
|
130 |
+
LeakyReLU-65 [-1, 256, 52, 52] 0
|
131 |
+
CNNBlock-66 [-1, 256, 52, 52] 0
|
132 |
+
Conv2d-67 [-1, 128, 52, 52] 32,768
|
133 |
+
BatchNorm2d-68 [-1, 128, 52, 52] 256
|
134 |
+
LeakyReLU-69 [-1, 128, 52, 52] 0
|
135 |
+
CNNBlock-70 [-1, 128, 52, 52] 0
|
136 |
+
Conv2d-71 [-1, 256, 52, 52] 294,912
|
137 |
+
BatchNorm2d-72 [-1, 256, 52, 52] 512
|
138 |
+
LeakyReLU-73 [-1, 256, 52, 52] 0
|
139 |
+
CNNBlock-74 [-1, 256, 52, 52] 0
|
140 |
+
Conv2d-75 [-1, 128, 52, 52] 32,768
|
141 |
+
BatchNorm2d-76 [-1, 128, 52, 52] 256
|
142 |
+
LeakyReLU-77 [-1, 128, 52, 52] 0
|
143 |
+
CNNBlock-78 [-1, 128, 52, 52] 0
|
144 |
+
Conv2d-79 [-1, 256, 52, 52] 294,912
|
145 |
+
BatchNorm2d-80 [-1, 256, 52, 52] 512
|
146 |
+
LeakyReLU-81 [-1, 256, 52, 52] 0
|
147 |
+
CNNBlock-82 [-1, 256, 52, 52] 0
|
148 |
+
Conv2d-83 [-1, 128, 52, 52] 32,768
|
149 |
+
BatchNorm2d-84 [-1, 128, 52, 52] 256
|
150 |
+
LeakyReLU-85 [-1, 128, 52, 52] 0
|
151 |
+
CNNBlock-86 [-1, 128, 52, 52] 0
|
152 |
+
Conv2d-87 [-1, 256, 52, 52] 294,912
|
153 |
+
BatchNorm2d-88 [-1, 256, 52, 52] 512
|
154 |
+
LeakyReLU-89 [-1, 256, 52, 52] 0
|
155 |
+
CNNBlock-90 [-1, 256, 52, 52] 0
|
156 |
+
Conv2d-91 [-1, 128, 52, 52] 32,768
|
157 |
+
BatchNorm2d-92 [-1, 128, 52, 52] 256
|
158 |
+
LeakyReLU-93 [-1, 128, 52, 52] 0
|
159 |
+
CNNBlock-94 [-1, 128, 52, 52] 0
|
160 |
+
Conv2d-95 [-1, 256, 52, 52] 294,912
|
161 |
+
BatchNorm2d-96 [-1, 256, 52, 52] 512
|
162 |
+
LeakyReLU-97 [-1, 256, 52, 52] 0
|
163 |
+
CNNBlock-98 [-1, 256, 52, 52] 0
|
164 |
+
Conv2d-99 [-1, 128, 52, 52] 32,768
|
165 |
+
BatchNorm2d-100 [-1, 128, 52, 52] 256
|
166 |
+
LeakyReLU-101 [-1, 128, 52, 52] 0
|
167 |
+
CNNBlock-102 [-1, 128, 52, 52] 0
|
168 |
+
Conv2d-103 [-1, 256, 52, 52] 294,912
|
169 |
+
BatchNorm2d-104 [-1, 256, 52, 52] 512
|
170 |
+
LeakyReLU-105 [-1, 256, 52, 52] 0
|
171 |
+
CNNBlock-106 [-1, 256, 52, 52] 0
|
172 |
+
ResidualBlock-107 [-1, 256, 52, 52] 0
|
173 |
+
Conv2d-108 [-1, 512, 26, 26] 1,179,648
|
174 |
+
BatchNorm2d-109 [-1, 512, 26, 26] 1,024
|
175 |
+
LeakyReLU-110 [-1, 512, 26, 26] 0
|
176 |
+
CNNBlock-111 [-1, 512, 26, 26] 0
|
177 |
+
Conv2d-112 [-1, 256, 26, 26] 131,072
|
178 |
+
BatchNorm2d-113 [-1, 256, 26, 26] 512
|
179 |
+
LeakyReLU-114 [-1, 256, 26, 26] 0
|
180 |
+
CNNBlock-115 [-1, 256, 26, 26] 0
|
181 |
+
Conv2d-116 [-1, 512, 26, 26] 1,179,648
|
182 |
+
BatchNorm2d-117 [-1, 512, 26, 26] 1,024
|
183 |
+
LeakyReLU-118 [-1, 512, 26, 26] 0
|
184 |
+
CNNBlock-119 [-1, 512, 26, 26] 0
|
185 |
+
Conv2d-120 [-1, 256, 26, 26] 131,072
|
186 |
+
BatchNorm2d-121 [-1, 256, 26, 26] 512
|
187 |
+
LeakyReLU-122 [-1, 256, 26, 26] 0
|
188 |
+
CNNBlock-123 [-1, 256, 26, 26] 0
|
189 |
+
Conv2d-124 [-1, 512, 26, 26] 1,179,648
|
190 |
+
BatchNorm2d-125 [-1, 512, 26, 26] 1,024
|
191 |
+
LeakyReLU-126 [-1, 512, 26, 26] 0
|
192 |
+
CNNBlock-127 [-1, 512, 26, 26] 0
|
193 |
+
Conv2d-128 [-1, 256, 26, 26] 131,072
|
194 |
+
BatchNorm2d-129 [-1, 256, 26, 26] 512
|
195 |
+
LeakyReLU-130 [-1, 256, 26, 26] 0
|
196 |
+
CNNBlock-131 [-1, 256, 26, 26] 0
|
197 |
+
Conv2d-132 [-1, 512, 26, 26] 1,179,648
|
198 |
+
BatchNorm2d-133 [-1, 512, 26, 26] 1,024
|
199 |
+
LeakyReLU-134 [-1, 512, 26, 26] 0
|
200 |
+
CNNBlock-135 [-1, 512, 26, 26] 0
|
201 |
+
Conv2d-136 [-1, 256, 26, 26] 131,072
|
202 |
+
BatchNorm2d-137 [-1, 256, 26, 26] 512
|
203 |
+
LeakyReLU-138 [-1, 256, 26, 26] 0
|
204 |
+
CNNBlock-139 [-1, 256, 26, 26] 0
|
205 |
+
Conv2d-140 [-1, 512, 26, 26] 1,179,648
|
206 |
+
BatchNorm2d-141 [-1, 512, 26, 26] 1,024
|
207 |
+
LeakyReLU-142 [-1, 512, 26, 26] 0
|
208 |
+
CNNBlock-143 [-1, 512, 26, 26] 0
|
209 |
+
Conv2d-144 [-1, 256, 26, 26] 131,072
|
210 |
+
BatchNorm2d-145 [-1, 256, 26, 26] 512
|
211 |
+
LeakyReLU-146 [-1, 256, 26, 26] 0
|
212 |
+
CNNBlock-147 [-1, 256, 26, 26] 0
|
213 |
+
Conv2d-148 [-1, 512, 26, 26] 1,179,648
|
214 |
+
BatchNorm2d-149 [-1, 512, 26, 26] 1,024
|
215 |
+
LeakyReLU-150 [-1, 512, 26, 26] 0
|
216 |
+
CNNBlock-151 [-1, 512, 26, 26] 0
|
217 |
+
Conv2d-152 [-1, 256, 26, 26] 131,072
|
218 |
+
BatchNorm2d-153 [-1, 256, 26, 26] 512
|
219 |
+
LeakyReLU-154 [-1, 256, 26, 26] 0
|
220 |
+
CNNBlock-155 [-1, 256, 26, 26] 0
|
221 |
+
Conv2d-156 [-1, 512, 26, 26] 1,179,648
|
222 |
+
BatchNorm2d-157 [-1, 512, 26, 26] 1,024
|
223 |
+
LeakyReLU-158 [-1, 512, 26, 26] 0
|
224 |
+
CNNBlock-159 [-1, 512, 26, 26] 0
|
225 |
+
Conv2d-160 [-1, 256, 26, 26] 131,072
|
226 |
+
BatchNorm2d-161 [-1, 256, 26, 26] 512
|
227 |
+
LeakyReLU-162 [-1, 256, 26, 26] 0
|
228 |
+
CNNBlock-163 [-1, 256, 26, 26] 0
|
229 |
+
Conv2d-164 [-1, 512, 26, 26] 1,179,648
|
230 |
+
BatchNorm2d-165 [-1, 512, 26, 26] 1,024
|
231 |
+
LeakyReLU-166 [-1, 512, 26, 26] 0
|
232 |
+
CNNBlock-167 [-1, 512, 26, 26] 0
|
233 |
+
Conv2d-168 [-1, 256, 26, 26] 131,072
|
234 |
+
BatchNorm2d-169 [-1, 256, 26, 26] 512
|
235 |
+
LeakyReLU-170 [-1, 256, 26, 26] 0
|
236 |
+
CNNBlock-171 [-1, 256, 26, 26] 0
|
237 |
+
Conv2d-172 [-1, 512, 26, 26] 1,179,648
|
238 |
+
BatchNorm2d-173 [-1, 512, 26, 26] 1,024
|
239 |
+
LeakyReLU-174 [-1, 512, 26, 26] 0
|
240 |
+
CNNBlock-175 [-1, 512, 26, 26] 0
|
241 |
+
ResidualBlock-176 [-1, 512, 26, 26] 0
|
242 |
+
Conv2d-177 [-1, 1024, 13, 13] 4,718,592
|
243 |
+
BatchNorm2d-178 [-1, 1024, 13, 13] 2,048
|
244 |
+
LeakyReLU-179 [-1, 1024, 13, 13] 0
|
245 |
+
CNNBlock-180 [-1, 1024, 13, 13] 0
|
246 |
+
Conv2d-181 [-1, 512, 13, 13] 524,288
|
247 |
+
BatchNorm2d-182 [-1, 512, 13, 13] 1,024
|
248 |
+
LeakyReLU-183 [-1, 512, 13, 13] 0
|
249 |
+
CNNBlock-184 [-1, 512, 13, 13] 0
|
250 |
+
Conv2d-185 [-1, 1024, 13, 13] 4,718,592
|
251 |
+
BatchNorm2d-186 [-1, 1024, 13, 13] 2,048
|
252 |
+
LeakyReLU-187 [-1, 1024, 13, 13] 0
|
253 |
+
CNNBlock-188 [-1, 1024, 13, 13] 0
|
254 |
+
Conv2d-189 [-1, 512, 13, 13] 524,288
|
255 |
+
BatchNorm2d-190 [-1, 512, 13, 13] 1,024
|
256 |
+
LeakyReLU-191 [-1, 512, 13, 13] 0
|
257 |
+
CNNBlock-192 [-1, 512, 13, 13] 0
|
258 |
+
Conv2d-193 [-1, 1024, 13, 13] 4,718,592
|
259 |
+
BatchNorm2d-194 [-1, 1024, 13, 13] 2,048
|
260 |
+
LeakyReLU-195 [-1, 1024, 13, 13] 0
|
261 |
+
CNNBlock-196 [-1, 1024, 13, 13] 0
|
262 |
+
Conv2d-197 [-1, 512, 13, 13] 524,288
|
263 |
+
BatchNorm2d-198 [-1, 512, 13, 13] 1,024
|
264 |
+
LeakyReLU-199 [-1, 512, 13, 13] 0
|
265 |
+
CNNBlock-200 [-1, 512, 13, 13] 0
|
266 |
+
Conv2d-201 [-1, 1024, 13, 13] 4,718,592
|
267 |
+
BatchNorm2d-202 [-1, 1024, 13, 13] 2,048
|
268 |
+
LeakyReLU-203 [-1, 1024, 13, 13] 0
|
269 |
+
CNNBlock-204 [-1, 1024, 13, 13] 0
|
270 |
+
Conv2d-205 [-1, 512, 13, 13] 524,288
|
271 |
+
BatchNorm2d-206 [-1, 512, 13, 13] 1,024
|
272 |
+
LeakyReLU-207 [-1, 512, 13, 13] 0
|
273 |
+
CNNBlock-208 [-1, 512, 13, 13] 0
|
274 |
+
Conv2d-209 [-1, 1024, 13, 13] 4,718,592
|
275 |
+
BatchNorm2d-210 [-1, 1024, 13, 13] 2,048
|
276 |
+
LeakyReLU-211 [-1, 1024, 13, 13] 0
|
277 |
+
CNNBlock-212 [-1, 1024, 13, 13] 0
|
278 |
+
ResidualBlock-213 [-1, 1024, 13, 13] 0
|
279 |
+
Conv2d-214 [-1, 1024, 13, 13] 1,048,576
|
280 |
+
BatchNorm2d-215 [-1, 1024, 13, 13] 2,048
|
281 |
+
LeakyReLU-216 [-1, 1024, 13, 13] 0
|
282 |
+
CNNBlock-217 [-1, 1024, 13, 13] 0
|
283 |
+
Conv2d-218 [-1, 2048, 13, 13] 18,874,368
|
284 |
+
BatchNorm2d-219 [-1, 2048, 13, 13] 4,096
|
285 |
+
LeakyReLU-220 [-1, 2048, 13, 13] 0
|
286 |
+
CNNBlock-221 [-1, 2048, 13, 13] 0
|
287 |
+
Conv2d-222 [-1, 1024, 13, 13] 2,097,152
|
288 |
+
BatchNorm2d-223 [-1, 1024, 13, 13] 2,048
|
289 |
+
LeakyReLU-224 [-1, 1024, 13, 13] 0
|
290 |
+
CNNBlock-225 [-1, 1024, 13, 13] 0
|
291 |
+
Conv2d-226 [-1, 2048, 13, 13] 18,874,368
|
292 |
+
BatchNorm2d-227 [-1, 2048, 13, 13] 4,096
|
293 |
+
LeakyReLU-228 [-1, 2048, 13, 13] 0
|
294 |
+
CNNBlock-229 [-1, 2048, 13, 13] 0
|
295 |
+
ResidualBlock-230 [-1, 2048, 13, 13] 0
|
296 |
+
Conv2d-231 [-1, 1024, 13, 13] 2,097,152
|
297 |
+
BatchNorm2d-232 [-1, 1024, 13, 13] 2,048
|
298 |
+
LeakyReLU-233 [-1, 1024, 13, 13] 0
|
299 |
+
CNNBlock-234 [-1, 1024, 13, 13] 0
|
300 |
+
Conv2d-235 [-1, 2048, 13, 13] 18,874,368
|
301 |
+
BatchNorm2d-236 [-1, 2048, 13, 13] 4,096
|
302 |
+
LeakyReLU-237 [-1, 2048, 13, 13] 0
|
303 |
+
CNNBlock-238 [-1, 2048, 13, 13] 0
|
304 |
+
Conv2d-239 [-1, 75, 13, 13] 153,675
|
305 |
+
CNNBlock-240 [-1, 75, 13, 13] 0
|
306 |
+
ScalePrediction-241 [-1, 3, 13, 13, 25] 0
|
307 |
+
Conv2d-242 [-1, 256, 13, 13] 262,144
|
308 |
+
BatchNorm2d-243 [-1, 256, 13, 13] 512
|
309 |
+
LeakyReLU-244 [-1, 256, 13, 13] 0
|
310 |
+
CNNBlock-245 [-1, 256, 13, 13] 0
|
311 |
+
Upsample-246 [-1, 256, 26, 26] 0
|
312 |
+
Conv2d-247 [-1, 256, 26, 26] 196,608
|
313 |
+
BatchNorm2d-248 [-1, 256, 26, 26] 512
|
314 |
+
LeakyReLU-249 [-1, 256, 26, 26] 0
|
315 |
+
CNNBlock-250 [-1, 256, 26, 26] 0
|
316 |
+
Conv2d-251 [-1, 512, 26, 26] 1,179,648
|
317 |
+
BatchNorm2d-252 [-1, 512, 26, 26] 1,024
|
318 |
+
LeakyReLU-253 [-1, 512, 26, 26] 0
|
319 |
+
CNNBlock-254 [-1, 512, 26, 26] 0
|
320 |
+
Conv2d-255 [-1, 256, 26, 26] 131,072
|
321 |
+
BatchNorm2d-256 [-1, 256, 26, 26] 512
|
322 |
+
LeakyReLU-257 [-1, 256, 26, 26] 0
|
323 |
+
CNNBlock-258 [-1, 256, 26, 26] 0
|
324 |
+
Conv2d-259 [-1, 512, 26, 26] 1,179,648
|
325 |
+
BatchNorm2d-260 [-1, 512, 26, 26] 1,024
|
326 |
+
LeakyReLU-261 [-1, 512, 26, 26] 0
|
327 |
+
CNNBlock-262 [-1, 512, 26, 26] 0
|
328 |
+
ResidualBlock-263 [-1, 512, 26, 26] 0
|
329 |
+
Conv2d-264 [-1, 256, 26, 26] 131,072
|
330 |
+
BatchNorm2d-265 [-1, 256, 26, 26] 512
|
331 |
+
LeakyReLU-266 [-1, 256, 26, 26] 0
|
332 |
+
CNNBlock-267 [-1, 256, 26, 26] 0
|
333 |
+
Conv2d-268 [-1, 512, 26, 26] 1,179,648
|
334 |
+
BatchNorm2d-269 [-1, 512, 26, 26] 1,024
|
335 |
+
LeakyReLU-270 [-1, 512, 26, 26] 0
|
336 |
+
CNNBlock-271 [-1, 512, 26, 26] 0
|
337 |
+
Conv2d-272 [-1, 75, 26, 26] 38,475
|
338 |
+
CNNBlock-273 [-1, 75, 26, 26] 0
|
339 |
+
ScalePrediction-274 [-1, 3, 26, 26, 25] 0
|
340 |
+
Conv2d-275 [-1, 128, 26, 26] 32,768
|
341 |
+
BatchNorm2d-276 [-1, 128, 26, 26] 256
|
342 |
+
LeakyReLU-277 [-1, 128, 26, 26] 0
|
343 |
+
CNNBlock-278 [-1, 128, 26, 26] 0
|
344 |
+
Upsample-279 [-1, 128, 52, 52] 0
|
345 |
+
Conv2d-280 [-1, 128, 52, 52] 49,152
|
346 |
+
BatchNorm2d-281 [-1, 128, 52, 52] 256
|
347 |
+
LeakyReLU-282 [-1, 128, 52, 52] 0
|
348 |
+
CNNBlock-283 [-1, 128, 52, 52] 0
|
349 |
+
Conv2d-284 [-1, 256, 52, 52] 294,912
|
350 |
+
BatchNorm2d-285 [-1, 256, 52, 52] 512
|
351 |
+
LeakyReLU-286 [-1, 256, 52, 52] 0
|
352 |
+
CNNBlock-287 [-1, 256, 52, 52] 0
|
353 |
+
Conv2d-288 [-1, 128, 52, 52] 32,768
|
354 |
+
BatchNorm2d-289 [-1, 128, 52, 52] 256
|
355 |
+
LeakyReLU-290 [-1, 128, 52, 52] 0
|
356 |
+
CNNBlock-291 [-1, 128, 52, 52] 0
|
357 |
+
Conv2d-292 [-1, 256, 52, 52] 294,912
|
358 |
+
BatchNorm2d-293 [-1, 256, 52, 52] 512
|
359 |
+
LeakyReLU-294 [-1, 256, 52, 52] 0
|
360 |
+
CNNBlock-295 [-1, 256, 52, 52] 0
|
361 |
+
ResidualBlock-296 [-1, 256, 52, 52] 0
|
362 |
+
Conv2d-297 [-1, 128, 52, 52] 32,768
|
363 |
+
BatchNorm2d-298 [-1, 128, 52, 52] 256
|
364 |
+
LeakyReLU-299 [-1, 128, 52, 52] 0
|
365 |
+
CNNBlock-300 [-1, 128, 52, 52] 0
|
366 |
+
Conv2d-301 [-1, 256, 52, 52] 294,912
|
367 |
+
BatchNorm2d-302 [-1, 256, 52, 52] 512
|
368 |
+
LeakyReLU-303 [-1, 256, 52, 52] 0
|
369 |
+
CNNBlock-304 [-1, 256, 52, 52] 0
|
370 |
+
Conv2d-305 [-1, 75, 52, 52] 19,275
|
371 |
+
CNNBlock-306 [-1, 75, 52, 52] 0
|
372 |
+
ScalePrediction-307 [-1, 3, 52, 52, 25] 0
|
373 |
+
================================================================
|
374 |
+
Total params: 107,980,481
|
375 |
+
Trainable params: 107,980,481
|
376 |
+
Non-trainable params: 0
|
377 |
+
----------------------------------------------------------------
|
378 |
+
Input size (MB): 1.98
|
379 |
+
Forward/backward pass size (MB): 1253.79
|
380 |
+
Params size (MB): 411.91
|
381 |
+
Estimated Total Size (MB): 1667.68
|
382 |
+
----------------------------------------------------------------
|
383 |
+
```
|
384 |
+
|
385 |
+
## Examples
|
386 |
+
App includes some examples images for testing
|
387 |
+

|
388 |
+
|
389 |
+
## Github
|
390 |
+
Training code may be found [here](https://github.com/Delve-ERAV1/S13)
|
391 |
+
|
392 |
+
## References
|
393 |
+
https://arxiv.org/abs/1804.02767
|
394 |
+
https://www.youtube.com/watch?v=Grir6TZbc1M
|
395 |
+
https://github.com/jacobgil/pytorch-grad-cam
|
396 |
+
|