asalhi85 commited on
Commit
3d4b1ac
1 Parent(s): 66b3d7b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = 2
30
  cfg.MODEL.WEIGHTS = model_path
31
 
32
- my_metadata = MetadataCatalog.get("dbmdz_coco_all")
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,