-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: doc page for the object detection task #20925
Add: doc page for the object detection task #20925
Conversation
This PR replaces the #20874 |
To preserve the discussion, here's @sayakpaul 's comment relevant to the CI issue: #20874 (comment) |
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @MKhalusova! I like the language and how the code is structured. I really really liked the code :)
I left a couple of requests for changes. Feel free to ask questions about them.
Do you have a Colab Notebook where this code has been tested (preferably with outputs)?
... draw.rectangle((x, y, x + w, y + h), outline="red", width=1) | ||
... draw.text((x, y), id2label[class_idx], fill="white") | ||
|
||
>>> image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to embed the resultant image after this. Refer here for a reference.
We keep the documentation images here: https://huggingface.co/datasets/huggingface/documentation-images. Once all the images have been collated, we open a PR to that repo (documentation-images
). Before opening the PR, we usually compress the images (ImageOptim is a good tool) and add them as Git LFS objects.
Once you raise the PR and until it's merged, you can host the images on IMGUR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I'll create a separate PR to add images and meanwhile I'll add it to the page as an imgur-hosted image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an image in 1a38260
Creating a PR to (documentation-images) is on my TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be easier to add the images to the documentation-images
repo yourself. I believe opening a PR is more for external contributors who can't commit directly 🙂
dummy = CocoDetection(path_output_cppe5, im_processor, path_anno) | ||
module = evaluate.load("ybelkada/cocoevaluate", coco=dummy.coco) | ||
val_dataloader = torch.utils.data.DataLoader(dummy, batch_size=8, shuffle=False, num_workers=4, collate_fn=collate_fn) | ||
|
||
with torch.no_grad(): | ||
for idx, batch in enumerate(tqdm(val_dataloader)): | ||
pixel_values = batch["pixel_values"] | ||
pixel_mask = batch["pixel_mask"] | ||
|
||
labels = [ | ||
{k: v for k, v in t.items()} for t in batch["labels"] | ||
] # these are in DETR format, resized + normalized | ||
|
||
# forward pass | ||
outputs = model(pixel_values=pixel_values, pixel_mask=pixel_mask) | ||
|
||
orig_target_sizes = torch.stack([target["orig_size"] for target in labels], dim=0) | ||
results = im_processor.post_process(outputs, orig_target_sizes) # convert outputs of model to COCO api | ||
|
||
module.add(prediction=results, reference=labels) | ||
del batch | ||
|
||
results = module.compute() | ||
print(results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spend a few sentences discussing the results and also append the output of print(results)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this guide, it looks great!
My main comments are:
- use the auto API everywhere. The convention for the docs is to only use one specific model/config/tokenizer/processor class in the docstring of that class, everywhere else should be the auto APIs as they will work without change for any other checkpoint.
- Make sure to split long code samples in several smaller ones with text introducing each step. The evaluation in particular is too long and may be too technical for this guide.
- Save images and annotations into files that you can create an instance of CocoDetection dataset from | ||
- Use `cocoevaluate` metric to compute the [COCO metrics](https://cocodataset.org/#detection-eval). | ||
|
||
```py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed way too long for this guide. It should be moved to a more advanced guide or juse be part in an example (this whole guide would make a great example once converted to a Python script) that we can link here.
I agree that the evaluation part is a bit too technical, but unfortunately at the moment, there's no simpler way (hopefully soon there will be an easier way to have coco evaluation metrics). But I can certainly split it up somewhat. |
Rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
A rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
typo Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
…parameters, and updated the results.
In this guide, you'll use the [CPPE-5 dataset](https://huggingface.co/datasets/cppe-5) that contains images with | ||
annotations identifying medical personal protective equipment (PPE) in the context of the COVID-19 pandemic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include a guide on how people can use their own data here. Using a HuggingFace dataset is nice, but the first question people always come up with is "but how I can use my own custom dataset?".
Here I'd recommend adding a link to ImageFolder + metadata, which allows people to turn their own images + bounding box annotations into a 🤗 Dataset: https://huggingface.co/docs/datasets/v2.8.0/en/image_dataset#object-detection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is out of scope of the tasks guide. None of the other one does that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a common question, perhaps, this can be a note or a tip in this doc? https://huggingface.co/docs/transformers/training
Something along the lines "In the Transformers documentation we use datasets from the Hugging Face Hub. If you would like to use your own custom data, check out the Datasets documentation on how to create a dataset" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be a good addition IMO.
|
||
In this guide, you will learn how to: | ||
|
||
1. Finetune [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a model that combines a convolutional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Finetune [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a model that combines a convolutional | |
1. Fine-tune [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a model that combines a convolutional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, both spellings are correct, however, I see that some folks have a preference for one, and some for the other. Both can be seen throughout the docs. Perhaps, we should agree on a single spelling variant, and update it throughout the whole doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an opensource repo like Transformers, it's going to be very tedious to maintain a consistent spelling since we have so many contributors (for this or pre-trained/pretrained). The positive impact of forcing one spelling is exactly zero since both are perfectly understandable, while taking time from reviewers/maintainers, so overall a negative impact.
1. Finetune [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a model that combines a convolutional | ||
backbone with an encoder-decoder Transformer, on the [CPPE-5](https://huggingface.co/datasets/cppe-5) | ||
dataset. | ||
2. Use your finetuned model for inference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Use your finetuned model for inference. | |
2. Use your fine-tuned model for inference. |
|
||
## Preprocess the data | ||
|
||
To finetune a model, you must preprocess the data you plan to use to match precisely the approach used for the pre-trained model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To finetune a model, you must preprocess the data you plan to use to match precisely the approach used for the pre-trained model. | |
To fine-tune a model, you must preprocess the data you plan to use to match precisely the approach used for the pre-trained model. |
These are the mean and standard deviation used to normalize images during the model pre-training. These values are crucial | ||
to replicate when doing inference or finetuning a pre-trained image model. | ||
|
||
Instantiate the image processor from the same checkpoint as the model you want to finetune. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instantiate the image processor from the same checkpoint as the model you want to finetune. | |
Instantiate the image processor from the same checkpoint as the model you want to fine-tune. |
1. Load the model with [`AutoModelForObjectDetection`] using the same checkpoint as in the preprocessing. | ||
2. Define your training hyperparameters in [`TrainingArguments`]. | ||
3. Pass the training arguments to [`Trainer`] along with the model, dataset, image processor, and data collator. | ||
4. Call [`~Trainer.train`] to finetune your model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. Call [`~Trainer.train`] to finetune your model. | |
4. Call [`~Trainer.train`] to fine-tune your model. |
Now that you have finetuned a DETR model, evaluated it, and uploaded it to the Hugging Face Hub, you can use it for inference. | ||
The simplest way to try out your finetuned model for inference is to use it in a `pipeline()`. Instantiate a pipeline | ||
for object detection with your model, and pass an image to it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you have finetuned a DETR model, evaluated it, and uploaded it to the Hugging Face Hub, you can use it for inference. | |
The simplest way to try out your finetuned model for inference is to use it in a `pipeline()`. Instantiate a pipeline | |
for object detection with your model, and pass an image to it: | |
Now that you have fine-tuned a DETR model, evaluated it, and uploaded it to the Hugging Face Hub, you can use it for inference. | |
The simplest way to try out your fine-tuned model for inference is to use it in a `pipeline()`. Instantiate a pipeline | |
for object detection with your model, and pass an image to it: |
@NielsRogge note that finetune/fine-tune has no decided standard in the doc/transformers and both are used equally. |
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, and thanks for all your work on this guide! It'll be huge for our computer vision efforts :)
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a LOT for your hard work @MKhalusova! Everything looks good to me. What a huge effort you have put in here and I am sure the community will be benefitted from it.
* Added Object Detection task guide (new branch) * Polished code examples after running make style * Update docs/source/en/tasks/object_detection.mdx Rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx A rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx typo Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Applied reviewers suggestions > > Co-authored-by: sayakpaul <spsayakpaul@gmail.com> Co-authored-by: sgugger <sylvain.gugger@gmail.com> * polished code examples * Added a visualization of the inference result. Slightly changed hyperparameters, and updated the results. * polished code examples * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Applying Steven's review suggestions Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * minor punctuation fix Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Added Object Detection task guide (new branch) * Polished code examples after running make style * Update docs/source/en/tasks/object_detection.mdx Rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx A rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx typo Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Applied reviewers suggestions > > Co-authored-by: sayakpaul <spsayakpaul@gmail.com> Co-authored-by: sgugger <sylvain.gugger@gmail.com> * polished code examples * Added a visualization of the inference result. Slightly changed hyperparameters, and updated the results. * polished code examples * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Applying Steven's review suggestions Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * minor punctuation fix Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Added Object Detection task guide (new branch) * Polished code examples after running make style * Update docs/source/en/tasks/object_detection.mdx Rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx A rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx typo Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Applied reviewers suggestions > > Co-authored-by: sayakpaul <spsayakpaul@gmail.com> Co-authored-by: sgugger <sylvain.gugger@gmail.com> * polished code examples * Added a visualization of the inference result. Slightly changed hyperparameters, and updated the results. * polished code examples * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Applying Steven's review suggestions Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * minor punctuation fix Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* Added Object Detection task guide (new branch) * Polished code examples after running make style * Update docs/source/en/tasks/object_detection.mdx Rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx A rephrasing suggestion from Sayak Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx typo Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Applied reviewers suggestions > > Co-authored-by: sayakpaul <spsayakpaul@gmail.com> Co-authored-by: sgugger <sylvain.gugger@gmail.com> * polished code examples * Added a visualization of the inference result. Slightly changed hyperparameters, and updated the results. * polished code examples * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Update docs/source/en/tasks/object_detection.mdx Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * Applying Steven's review suggestions Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> * minor punctuation fix Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
This is a PR for the #20805 issue. The guide has content and working code examples for: