image.manual returns ValueError: Unmatched ''"' when when decoding 'string'

Hi! Thanks for the report – this is definitely strange. It seems like the base64 string representing the image gets corrupted somehow.

How big are your images? And when you look at what's in your MySQL database, can you see any JSON blobs that are cut off? And if so, where? If the images are very large, one possible explanation is that the JSON gets truncated when it's saved to the DB.

If your images are large and you can't easily change that, one solution would be to not rely on encoding the entire image as as string and instead load the images via URLs (and maybe keep an additional reference to the image ID so you can always relate the annotations back). Your input data could then be a JSONL file and you could specify --loader jsonl in image.manual. For example:

{"image": "https://example.com/image1.jpg", "id": 123}
{"image": "https://example.com/image2.jpg", "id": 456}

One thing to note: Using local file paths for the images isn't going to work, since modern browsers typically block those for security reasons (see here for details). So you'd either have to start a simple local server to host the directory of images, or upload them somewhere (like an S3 bucket).