-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When I run RT_DETR_v2_finetune_on_a_custom_dataset.ipynb, I get this error:
AttributeError Traceback (most recent call last)
[/tmp/ipython-input-86719368.py](https://localhost:8080/#) in <cell line: 0>()
3
4 # Get mapping from category id to category name
----> 5 categories = dataset["train"].features["objects"].feature["category"].names
6 id2label = {index: x for index, x in enumerate(categories, start=0)}
7 label2id = {v: k for k, v in id2label.items()}
AttributeError: 'dict' object has no attribute 'feature'
I solved it by changing the line 5 like this:
categories = dataset["train"].features["objects"]["category"].feature.names
Metadata
Metadata
Assignees
Labels
No labels