mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 18:51:14 +06:00
fix docs example, add object_detection to DETR docs (#19377)
This commit is contained in:
parent
ce2620194b
commit
ae3e3bc60a
@ -171,6 +171,7 @@ mean Average Precision (mAP) and Panoptic Quality (PQ). The latter objects are i
|
|||||||
[[autodoc]] DetrFeatureExtractor
|
[[autodoc]] DetrFeatureExtractor
|
||||||
- __call__
|
- __call__
|
||||||
- pad_and_create_pixel_mask
|
- pad_and_create_pixel_mask
|
||||||
|
- post_process_object_detection
|
||||||
- post_process_semantic_segmentation
|
- post_process_semantic_segmentation
|
||||||
- post_process_instance_segmentation
|
- post_process_instance_segmentation
|
||||||
- post_process_panoptic_segmentation
|
- post_process_panoptic_segmentation
|
||||||
|
@ -1605,11 +1605,11 @@ class DetrForSegmentation(DetrPreTrainedModel):
|
|||||||
|
|
||||||
>>> # Use the `post_process_panoptic_segmentation` method of `DetrFeatureExtractor` to retrieve post-processed panoptic segmentation maps
|
>>> # Use the `post_process_panoptic_segmentation` method of `DetrFeatureExtractor` to retrieve post-processed panoptic segmentation maps
|
||||||
>>> # Segmentation results are returned as a list of dictionaries
|
>>> # Segmentation results are returned as a list of dictionaries
|
||||||
>>> result = feature_extractor.post_process_panoptic_segmentation(outputs, target_size=[(300, 500)])
|
>>> result = feature_extractor.post_process_panoptic_segmentation(outputs, target_sizes=[(300, 500)])
|
||||||
|
|
||||||
>>> # A tensor of shape (height, width) where each value denotes a segment id
|
>>> # A tensor of shape (height, width) where each value denotes a segment id, filled with -1 if no segment is found
|
||||||
>>> panoptic_seg = result[0]["segmentation"]
|
>>> panoptic_seg = result[0]["segmentation"]
|
||||||
>>> # Get mapping of segment ids to semantic class ids
|
>>> # Get prediction score and segment_id to class_id mapping of each segment
|
||||||
>>> panoptic_segments_info = result[0]["segments_info"]
|
>>> panoptic_segments_info = result[0]["segments_info"]
|
||||||
```"""
|
```"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user