enpaiva commited on
Commit
7a97820
·
verified ·
1 Parent(s): 6e49702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -126,11 +126,6 @@ def process_image_for_gradio(model, device, image, model_name, threshold=0.4):
126
  classinfofile = model_configs[model_name]["classinfofile"]
127
  classinfo = yaml.load(open(classinfofile, "r"), Loader=yaml.FullLoader)["names"]
128
  indexing_method = "0-based" if "coco" in classinfofile else "1-based"
129
-
130
- print("classinfo: ", classinfo)
131
- print()
132
- print("indexing_method: ", indexing_method)
133
- print()
134
 
135
  w, h = im_pil.size
136
  orig_size = torch.tensor([[w, h]]).to(device)
@@ -146,8 +141,6 @@ def process_image_for_gradio(model, device, image, model_name, threshold=0.4):
146
  output = model(im_data, orig_size)
147
  labels, boxes, scores = output
148
 
149
- print("labels: ", labels)
150
-
151
  # Visualize results
152
  detections = sv.Detections(
153
  xyxy=boxes[0].detach().cpu().numpy(),
 
126
  classinfofile = model_configs[model_name]["classinfofile"]
127
  classinfo = yaml.load(open(classinfofile, "r"), Loader=yaml.FullLoader)["names"]
128
  indexing_method = "0-based" if "coco" in classinfofile else "1-based"
 
 
 
 
 
129
 
130
  w, h = im_pil.size
131
  orig_size = torch.tensor([[w, h]]).to(device)
 
141
  output = model(im_data, orig_size)
142
  labels, boxes, scores = output
143
 
 
 
144
  # Visualize results
145
  detections = sv.Detections(
146
  xyxy=boxes[0].detach().cpu().numpy(),