Skip to content

Commit c430047

Browse files
authored
[docs] update object detection guide (#39909)
* Update object_detection.md * Update object_detection.md
1 parent dedcbd6 commit c430047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/en/tasks/object_detection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ To get an even better understanding of the data, visualize an example in the dat
146146
>>> annotations = cppe5["train"][2]["objects"]
147147
>>> draw = ImageDraw.Draw(image)
148148

149-
>>> categories = cppe5["train"].features["objects"].feature["category"].names
149+
>>> categories = cppe5["train"].features["objects"]["category"].feature.names
150150

151151
>>> id2label = {index: x for index, x in enumerate(categories, start=0)}
152152
>>> label2id = {v: k for k, v in id2label.items()}

0 commit comments

Comments
 (0)