Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -26,10 +26,10 @@ model_path = "https://huggingface.co/asalhi85/Smartathon-Detectron2/resolve/9f4d
|
|
26 |
|
27 |
cfg = get_cfg()
|
28 |
cfg.merge_from_file("./faster_rcnn_X_101_32x8d_FPN_3x.yaml")
|
29 |
-
cfg.MODEL.ROI_HEADS.NUM_CLASSES =
|
30 |
cfg.MODEL.WEIGHTS = model_path
|
31 |
|
32 |
-
my_metadata = MetadataCatalog.get("
|
33 |
my_metadata.thing_classes = ["GRAFFITI", "FADED_SIGNAGE","POTHOLES","GARBAGE","CONSTRUCTION_ROAD","BROKEN_SIGNAGE","BAD_STREETLIGHT","BAD_BILLBOARD","SAND_ON_ROAD","CLUTTER_SIDEWALK","UNKEPT_FACADE"]
|
34 |
# #smart_dict={'GRAFFITI' : 0.0 , 'FADED_SIGNAGE': 1.0 , 'POTHOLES': 2.0,
|
35 |
# 'GARBAGE' : 3.0 , 'CONSTRUCTION_ROAD': 4.0 , 'BROKEN_SIGNAGE': 5.0,
|
|
|
26 |
|
27 |
cfg = get_cfg()
|
28 |
cfg.merge_from_file("./faster_rcnn_X_101_32x8d_FPN_3x.yaml")
|
29 |
+
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 11
|
30 |
cfg.MODEL.WEIGHTS = model_path
|
31 |
|
32 |
+
my_metadata = MetadataCatalog.get("")
|
33 |
my_metadata.thing_classes = ["GRAFFITI", "FADED_SIGNAGE","POTHOLES","GARBAGE","CONSTRUCTION_ROAD","BROKEN_SIGNAGE","BAD_STREETLIGHT","BAD_BILLBOARD","SAND_ON_ROAD","CLUTTER_SIDEWALK","UNKEPT_FACADE"]
|
34 |
# #smart_dict={'GRAFFITI' : 0.0 , 'FADED_SIGNAGE': 1.0 , 'POTHOLES': 2.0,
|
35 |
# 'GARBAGE' : 3.0 , 'CONSTRUCTION_ROAD': 4.0 , 'BROKEN_SIGNAGE': 5.0,
|