taroii commited on
Commit
0d5d215
1 Parent(s): 432d4c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,8 +15,8 @@ def anylize(img):
15
  outputs = model(**inputs)
16
 
17
  #target_sizes = torch.tensor([image.size])
18
- target_sizes = torch.tensor([image.size[::-1]])
19
- #target_sizes = torch.tensor([image.shape[:2]])
20
  results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.9)[0]
21
 
22
  print(f"results: {results}")
 
15
  outputs = model(**inputs)
16
 
17
  #target_sizes = torch.tensor([image.size])
18
+ #target_sizes = torch.tensor([image.size[::-1]])
19
+ target_sizes = torch.tensor([image.shape[:2]])
20
  results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.9)[0]
21
 
22
  print(f"results: {results}")