vishnun commited on
Commit
90ddda1
1 Parent(s): e19e289

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -26,7 +26,6 @@ def extract_image(image, text, num=1):
26
  probas = outputs.logits.softmax(-1)[0, :, :-1] #removing no class as detr maps
27
 
28
  keep = probas.max(-1).values > 0.96
29
- print(image.size, outputs)
30
  outs = feature_extractor.post_process(outputs, torch.tensor(image.size[::-1]).unsqueeze(0))
31
  bboxes_scaled = outs[0]['boxes'][keep].detach().numpy()
32
  labels = outs[0]['labels'][keep].detach().numpy()
 
26
  probas = outputs.logits.softmax(-1)[0, :, :-1] #removing no class as detr maps
27
 
28
  keep = probas.max(-1).values > 0.96
 
29
  outs = feature_extractor.post_process(outputs, torch.tensor(image.size[::-1]).unsqueeze(0))
30
  bboxes_scaled = outs[0]['boxes'][keep].detach().numpy()
31
  labels = outs[0]['labels'][keep].detach().numpy()