RodneyVG commited on
Commit
d40caaa
1 Parent(s): 7468a4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,9 +6,9 @@ import torch
6
 
7
  def object_count(picture):
8
 
9
- feature_extractor = DetrFeatureExtractor.from_pretrained("facebook/detr-resnet-50")
10
  encoding = feature_extractor(picture, return_tensors="pt")
11
- model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
12
  outputs = model(**encoding)
13
  # keep only predictions of queries with 0.9+ confidence (excluding no-object class)
14
  probas = outputs.logits.softmax(-1)[0, :, :-1]
 
6
 
7
  def object_count(picture):
8
 
9
+ feature_extractor = DetrFeatureExtractor.from_pretrained("facebook/detr-resnet-101-dc5")
10
  encoding = feature_extractor(picture, return_tensors="pt")
11
+ model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-101-dc5")
12
  outputs = model(**encoding)
13
  # keep only predictions of queries with 0.9+ confidence (excluding no-object class)
14
  probas = outputs.logits.softmax(-1)[0, :, :-1]