Spaces:
Sleeping
Sleeping
Update doors_fasterrcnn.py
Browse files- doors_fasterrcnn.py +7 -1
doors_fasterrcnn.py
CHANGED
|
@@ -194,9 +194,15 @@ def main_run(pdf_fullpath, weights_path, pdf_name):
|
|
| 194 |
# START INFERENCE
|
| 195 |
sbox, dbox = ev_model(new_image, model, device, 0.6)
|
| 196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
single_info = mid_points_bbox(sbox)
|
| 198 |
double_info = mid_points_bbox(dbox)
|
| 199 |
-
|
|
|
|
| 200 |
single_annotations = create_annotations("single door", single_info)
|
| 201 |
double_annotations = create_annotations("double door", double_info)
|
| 202 |
|
|
|
|
| 194 |
# START INFERENCE
|
| 195 |
sbox, dbox = ev_model(new_image, model, device, 0.6)
|
| 196 |
|
| 197 |
+
#Dataframe for Doors count
|
| 198 |
+
doors_count = {'Type': ['Single Doors', 'Double Doors'], 'Quantity': [len(sbox), len(dbox)]}
|
| 199 |
+
df_doors = pd.DataFrame(doors_count)
|
| 200 |
+
|
| 201 |
+
#Door's details for annotation
|
| 202 |
single_info = mid_points_bbox(sbox)
|
| 203 |
double_info = mid_points_bbox(dbox)
|
| 204 |
+
|
| 205 |
+
#Annotations that will be printed on the pdf
|
| 206 |
single_annotations = create_annotations("single door", single_info)
|
| 207 |
double_annotations = create_annotations("double door", double_info)
|
| 208 |
|