flore2003 commited on
Commit
8f35a83
1 Parent(s): eaa356d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +7 -8
README.md CHANGED
@@ -29,7 +29,7 @@ The recently-developed DETR approach applies the transformer encoder and decoder
29
 
30
  ## Intended uses & limitations
31
 
32
- You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=microsoft/conditional-detr) to look for all available Conditional DETR models.
33
 
34
  ### How to use
35
 
@@ -44,8 +44,8 @@ import requests
44
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
45
  image = Image.open(requests.get(url, stream=True).raw)
46
 
47
- processor = AutoImageProcessor.from_pretrained("microsoft/conditional-detr-resnet-50")
48
- model = ConditionalDetrForObjectDetection.from_pretrained("microsoft/conditional-detr-resnet-50")
49
 
50
  inputs = processor(images=image, return_tensors="pt")
51
  outputs = model(**inputs)
@@ -64,13 +64,12 @@ for score, label, box in zip(results["scores"], results["labels"], results["boxe
64
  ```
65
  This should output:
66
  ```
67
- Detected remote with confidence 0.833 at location [38.31, 72.1, 177.63, 118.45]
68
- Detected cat with confidence 0.831 at location [9.2, 51.38, 321.13, 469.0]
69
- Detected cat with confidence 0.804 at location [340.3, 16.85, 642.93, 370.95]
 
70
  ```
71
 
72
- Currently, both the feature extractor and model support PyTorch.
73
-
74
  ## Training data
75
 
76
  The Conditional DETR model was trained on [COCO 2017 object detection](https://cocodataset.org/#download), a dataset consisting of 118k/5k annotated images for training/validation respectively.
 
29
 
30
  ## Intended uses & limitations
31
 
32
+ You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=conditional-detr) to look for all available Conditional DETR models.
33
 
34
  ### How to use
35
 
 
44
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
45
  image = Image.open(requests.get(url, stream=True).raw)
46
 
47
+ processor = AutoImageProcessor.from_pretrained("Omnifact/conditional-detr-resnet-101-dc5")
48
+ model = ConditionalDetrForObjectDetection.from_pretrained("Omnifact/conditional-detr-resnet-101-dc5")
49
 
50
  inputs = processor(images=image, return_tensors="pt")
51
  outputs = model(**inputs)
 
64
  ```
65
  This should output:
66
  ```
67
+ Detected cat with confidence 0.865 at location [13.95, 64.98, 327.14, 478.82]
68
+ Detected remote with confidence 0.849 at location [39.37, 83.18, 187.67, 125.02]
69
+ Detected cat with confidence 0.743 at location [327.22, 35.17, 637.54, 377.04]
70
+ Detected remote with confidence 0.737 at location [329.36, 89.47, 376.42, 197.53]
71
  ```
72
 
 
 
73
  ## Training data
74
 
75
  The Conditional DETR model was trained on [COCO 2017 object detection](https://cocodataset.org/#download), a dataset consisting of 118k/5k annotated images for training/validation respectively.