[docs] update object detection guide (#39909)
* Update object_detection.md * Update object_detection.md
This commit is contained in:
@@ -146,7 +146,7 @@ To get an even better understanding of the data, visualize an example in the dat
|
||||
>>> annotations = cppe5["train"][2]["objects"]
|
||||
>>> draw = ImageDraw.Draw(image)
|
||||
|
||||
>>> categories = cppe5["train"].features["objects"].feature["category"].names
|
||||
>>> categories = cppe5["train"].features["objects"]["category"].feature.names
|
||||
|
||||
>>> id2label = {index: x for index, x in enumerate(categories, start=0)}
|
||||
>>> label2id = {v: k for k, v in id2label.items()}
|
||||
|
||||
Reference in New Issue
Block a user