Instructions to use stevenbucaille/lwdetr_tiny_30e_objects365 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stevenbucaille/lwdetr_tiny_30e_objects365 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="stevenbucaille/lwdetr_tiny_30e_objects365")# Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("stevenbucaille/lwdetr_tiny_30e_objects365") model = AutoModelForObjectDetection.from_pretrained("stevenbucaille/lwdetr_tiny_30e_objects365", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
41ce12f
1
Parent(s): 8680cad
card: replace official repo name from stevenbucaille to AnnaZhang
Browse files
README.md
CHANGED
|
@@ -33,7 +33,7 @@ Training Details:
|
|
| 33 |
|
| 34 |
### How to use
|
| 35 |
|
| 36 |
-
You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=
|
| 37 |
|
| 38 |
Here is how to use this model:
|
| 39 |
|
|
@@ -46,8 +46,8 @@ import requests
|
|
| 46 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 47 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 48 |
|
| 49 |
-
processor = AutoImageProcessor.from_pretrained("
|
| 50 |
-
model = LwDetrForObjectDetection.from_pretrained("
|
| 51 |
|
| 52 |
inputs = processor(images=image, return_tensors="pt")
|
| 53 |
outputs = model(**inputs)
|
|
|
|
| 33 |
|
| 34 |
### How to use
|
| 35 |
|
| 36 |
+
You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=AnnaZhang/lw-detr) to look for all available LW DETR models.
|
| 37 |
|
| 38 |
Here is how to use this model:
|
| 39 |
|
|
|
|
| 46 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 47 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 48 |
|
| 49 |
+
processor = AutoImageProcessor.from_pretrained("AnnaZhang/lwdetr_tiny_30e_objects365")
|
| 50 |
+
model = LwDetrForObjectDetection.from_pretrained("AnnaZhang/lwdetr_tiny_30e_objects365")
|
| 51 |
|
| 52 |
inputs = processor(images=image, return_tensors="pt")
|
| 53 |
outputs = model(**inputs)
|