drab commited on
Commit
e40462a
1 Parent(s): 0e69446

Simple debug version

Browse files
Files changed (1) hide show
  1. pipeline.py +8 -8
pipeline.py CHANGED
@@ -21,7 +21,7 @@ class PreTrainedPipeline():
21
  # load the model
22
  self.model = tf.saved_model.load(os.path.join(path, "saved_model"))
23
 
24
- # def __call__(self, inputs: "Image.Image")-> List[Dict[str, Any]]:
25
 
26
  # # convert img to numpy array, resize and normalize to make the prediction
27
  # img = np.array(inputs)
@@ -81,12 +81,12 @@ class PreTrainedPipeline():
81
  # "score": 1.0,
82
  # })
83
 
84
- # labels = [{"score":0.9509243965148926,"label":"car","box":{"xmin":142,"ymin":106,"xmax":376,"ymax":229}},
85
- # {"score":0.9981777667999268,"label":"car","box":{"xmin":405,"ymin":146,"xmax":640,"ymax":297}},
86
- # {"score":0.9963648915290833,"label":"car","box":{"xmin":0,"ymin":115,"xmax":61,"ymax":167}},
87
- # {"score":0.974663257598877,"label":"car","box":{"xmin":155,"ymin":104,"xmax":290,"ymax":141}},
88
- # {"score":0.9986898303031921,"label":"car","box":{"xmin":39,"ymin":117,"xmax":169,"ymax":188}},
89
- # {"score":0.9998276233673096,"label":"person","box":{"xmin":172,"ymin":60,"xmax":482,"ymax":396}},
90
- # {"score":0.9996274709701538,"label":"skateboard","box":{"xmin":265,"ymin":348,"xmax":440,"ymax":413}}]
91
 
92
  # return labels
 
21
  # load the model
22
  self.model = tf.saved_model.load(os.path.join(path, "saved_model"))
23
 
24
+ def __call__(self, inputs: "Image.Image")-> List[Dict[str, Any]]:
25
 
26
  # # convert img to numpy array, resize and normalize to make the prediction
27
  # img = np.array(inputs)
 
81
  # "score": 1.0,
82
  # })
83
 
84
+ labels = [{"score":0.9509243965148926,"label":"car","box":{"xmin":142,"ymin":106,"xmax":376,"ymax":229}},
85
+ {"score":0.9981777667999268,"label":"car","box":{"xmin":405,"ymin":146,"xmax":640,"ymax":297}},
86
+ {"score":0.9963648915290833,"label":"car","box":{"xmin":0,"ymin":115,"xmax":61,"ymax":167}},
87
+ {"score":0.974663257598877,"label":"car","box":{"xmin":155,"ymin":104,"xmax":290,"ymax":141}},
88
+ {"score":0.9986898303031921,"label":"car","box":{"xmin":39,"ymin":117,"xmax":169,"ymax":188}},
89
+ {"score":0.9998276233673096,"label":"person","box":{"xmin":172,"ymin":60,"xmax":482,"ymax":396}},
90
+ {"score":0.9996274709701538,"label":"skateboard","box":{"xmin":265,"ymin":348,"xmax":440,"ymax":413}}]
91
 
92
  # return labels