The inference outputs imagenet's label, not the label of my custom dataset. #1800
Replies: 2 comments 3 replies
-
Did you try to also provide the argument
|
Beta Was this translation helpful? Give feedback.
-
@alphaProgrammingNow so yeah, this has not been added to the inference script, the labelling (for imagenet) feature is relatively recent, some of the bits are there but nothing has been added to inference.py A custom dataset info class (https://github.com/huggingface/pytorch-image-models/blob/main/timm/data/dataset_info.py#L35) |
Beta Was this translation helpful? Give feedback.
-
The training script is:
My dataset file directory is as follows:
and the content of class-map(i.e. class_to_idx.txt) is:
And the training process is normal.
But when I use trained models to inference on two images, using the following script:
the output label is the label of imagenet, such as
electric ray
andcrampfish
, not my own dataset (which should bedog
,cat
and so on):I don't understand why. Could someone help me?
Beta Was this translation helpful? Give feedback.
All reactions