简体   繁体   中英

Re-using created dataset for different task (object detection - image classification)

I have created a large dataset in Amazon sagemaker and labeled it using bounding boxes. I used this dataset for object detection and everything worked fine. Later, I wanted to use this dataset for simple image classification. But every time, I try to run it, I get an error: Customer Error: Label was not a float.

I think that the problem are probably bounding boxes as the image classification algorithm does not expect them, but is there any way, how to change it?? My goal is to use the parts of image that are in bounding boxes for image classification training. Is there any way, how to set parameters, so that the algorithm could accept as input the information in bounding boxes?

Bellow is a snippet from a log file that was generated, when I tried to run image classification on dataset with bounding boxes.

[14:42:27] /opt/brazil-pkg-cache/packages/AIApplicationsPipeIterators/AIApplicationsPipeIterators-1.0.1145.0/AL2012/generic-flavor/src/data_iter/src/ease_image_iter.cpp:452: JSON Logic Error while parsing 
{
    "annotations": [
        {
            "class_id": 0,
            "height": 194,
            "left": 34,
            "top": 16,
            "width": 150
        }
    ],
    "image_size": [
        {
            "depth": 3,
            "height": 256,
            "width": 185
        }
    ]
}
: Value is not convertible to float.

PS: The dataset is an augmented manifest file.

I would be very grateful for any help.

Thank you for reaching out to us. SageMaker algorithms for Training expect a specific format for the labels for each algorithms. For example, https://docs.aws.amazon.com/sagemaker/latest/dg/image-classification.html . Hence, you cannot feed the bounding boxes to Image classification Training algorithm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM