sshi commited on
Commit
c473504
1 Parent(s): cec8f07

App Bug fix.

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -14,6 +14,7 @@ from transformers import AutoFeatureExtractor, AutoModelForObjectDetection
14
  from PIL import Image
15
  import matplotlib.pyplot as plt
16
 
 
17
 
18
  class Detr(pl.LightningModule):
19
 
@@ -85,8 +86,6 @@ COLORS = [[0.000, 0.447, 0.741], [0.850, 0.325, 0.098], [0.929, 0.694, 0.125],
85
  [0.184, 0.494, 0.741], [0.494, 0.674, 0.556], [0.494, 0.301, 0.933],
86
  [0.000, 0.325, 0.850], [0.745, 0.301, 0.188]]
87
 
88
- id2label = {1: 'person', 2: 'rider', 3: 'car', 4: 'bus', 5: 'truck', 6: 'bike', 7: 'motor', 8: 'traffic light', 9: 'traffic sign', 10: 'train'}
89
-
90
  # for output bounding box post-processing
91
  def box_cxcywh_to_xyxy(x):
92
  x_c, y_c, w, h = x.unbind(1)
 
14
  from PIL import Image
15
  import matplotlib.pyplot as plt
16
 
17
+ id2label = {1: 'person', 2: 'rider', 3: 'car', 4: 'bus', 5: 'truck', 6: 'bike', 7: 'motor', 8: 'traffic light', 9: 'traffic sign', 10: 'train'}
18
 
19
  class Detr(pl.LightningModule):
20
 
 
86
  [0.184, 0.494, 0.741], [0.494, 0.674, 0.556], [0.494, 0.301, 0.933],
87
  [0.000, 0.325, 0.850], [0.745, 0.301, 0.188]]
88
 
 
 
89
  # for output bounding box post-processing
90
  def box_cxcywh_to_xyxy(x):
91
  x_c, y_c, w, h = x.unbind(1)