I have a multi-label problem. I have read many tutorials and all work with CSV. But I have a JSON. An image can have one to three labels. This is what the JSON looks like: {"PIC_NAME": ["Label1"], "PIC_NAME": ["Label2", "Label6"], "PIC_NAME": ["Label20"], "PIC_NAME": ["Label4"], "PIC_NAME": ["Label5"], "PIC_NAME": ["Label1"], "PIC_NAME": ["Label15"], ...
The CSV work with binary labels. But I only have Strings. There are 20 different labels. If it should be like in the tutorials, then a picture should be marked with 23 binary numbers. If the label (for example Label1) is true, there is a 1 and all other labels are set to 0. I work with Keras.
Does anyone have any idea how I can solve the problem with a JSON? This is an example of a tutorial I have read: https://www.analyticsvidhya.com/blog/2019/04/build-first-multi-label-image-classification-model-python/
As an example we have a picture with a cat, a dog and a bird. The picture shows a dog and a bird. Then it should look like this: 0 1 1. Because there is no cat in the picture, the first value is 0. I wish it could look like in the tutorial above


