ruiite commited on
Commit
8f9cd73
1 Parent(s): 82a5e1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -33,12 +33,12 @@ if not torch.cuda.is_available():
33
  predictor = DefaultPredictor(cfg)
34
 
35
  def inference(image):
36
- # print(image.height)
37
 
38
- # height = image.height
39
 
40
- # img = np.array(image.resize((500, height)))
41
- outputs = predictor(image)
42
 
43
  v = Visualizer(img,scale=1.2)
44
  out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
 
33
  predictor = DefaultPredictor(cfg)
34
 
35
  def inference(image):
36
+ print(image.height)
37
 
38
+ height = image.height
39
 
40
+ img = np.array(image.resize((500, height)))
41
+ outputs = predictor(img)
42
 
43
  v = Visualizer(img,scale=1.2)
44
  out = v.draw_instance_predictions(outputs["instances"].to("cpu"))