Need one image to have multiple labels

0

Hi, I am looking for a way to create datasets using manifest or auto labeling feature or any other way to allow me to label multiple objects in an image so that each object I select has a label.

Tried to create datasets using manifest so that the manifest only has class_id and class-map attributes but not having any boundingbox attributes. I was able to create such datasets. From the dataset GUI, I can see each each image has multiple labels associated. However training fails with error "The manifest file contains too many invalid data objects."

I made another attempt by putting same image that has multiple objects in multiple folders that represent their labels. I was able to create datasets and even successfully trained that dataset-pair. But from viewing the test result, no single image correctly labeled twice.

Do you support my scenario?

thank you.

gefragt vor 4 Jahren407 Aufrufe
4 Antworten
0

Hi, Could I get some expert opinions for my questions? thx.

beantwortet vor 4 Jahren
0

Hey mymingle

Unfortunately the custom labels console does not support attaching multiple labels to a single image using the autolabel feature. I have passed on this feedback to the corresponding team.

You can follow the below sample format when manually creating a multi label manifest file (expanding on the example specified here https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/cd-required-fields.html):

{
"source-ref": "S3 bucket location", # Required
"sport0":0, # FIRST annotation
"sport0-metadata": { # Required
"class-name": "football", # Required
"confidence": 0.8, # Required
"type":"groundtruth/image-classification", # Required
"job-name": "identify-sport", # Not required
"human-annotated": "yes", # Required
"creation-date": "2018-10-18T22:18:13.527256" # Required
},
"sport1":1, # SECOND annotation
"sport1-metadata": { # Required
"class-name": "ball", # Required
"confidence": 0.8, # Required
"type":"groundtruth/image-classification", # Required
"job-name": "identify-sport", # Not required
"human-annotated": "yes", # Required
"creation-date": "2018-10-18T22:18:13.527256" # Required
}
} # end of annotations for 1 image

The above line attaches labels "football" and "ball" to the same image.

You can use any string instead of "sport0", "sport1" etc but you must ensure there is a corresponding "-metadata" field. For e.g. if you use "some-label1", ensure it is followed by a "some-label1-metadata" section.

Each "some-label<N>", <some-label<N>-metadata" pair represents ONE annotation.

Hope this helps.

AWS
beantwortet vor 4 Jahren
0

Reposting example with formatting -

 {
    "source-ref": "S3 bucket location", # Required
    "sport0":0, # FIRST annotation
    "sport0-metadata": { # Required
        "class-name": "football", # Required
        "confidence": 0.8, # Required
        "type":"groundtruth/image-classification", # Required
        "job-name": "identify-sport", # Not required
        "human-annotated": "yes", # Required
        "creation-date": "2018-10-18T22:18:13.527256" # Required
    },
    "sport1":1, # SECOND annotation
    "sport1-metadata": { # Required
        "class-name": "ball", # Required
        "confidence": 0.8, # Required
        "type":"groundtruth/image-classification", # Required
        "job-name": "identify-sport", # Not required
        "human-annotated": "yes", # Required
        "creation-date": "2018-10-18T22:18:13.527256" # Required
    }
}  # end of annotations for 1 image 

Edited by: awsrakesh on Mar 24, 2020 1:56 PM

AWS
beantwortet vor 4 Jahren
0

That manifest format works. Thank you.

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen