Getting invalid float numbers after image.manual recipe annotation

We are using the "image.manual" recipe for image annotations (prodigy image.manual gt-20210929-001 - --loader jsonl --label Person --no-fetch). However we are seeing some invalid float numbers (numbers with two decimals) in the points and the center keys. Another point to note is all these invalid entries are surrounded by double quotes.

What could be the reason for this?

Here are some examples:

 {
        "label": "car",
        "color": "red",
        "x": "812.0",
        "y": "525.0",
        "width": "148.0",
        "height": "48.0",
        "type": "rect",
        "id": "4a9386d1-7eaa-4159-a124-11f5dda8e839",
        "points": [
            [
                "812.0",
                "525.0"
            ],
            [
                "812.0",
                "525.048.0"
            ],
            [
                "812.0148.0",
                "525.048.0"
            ],
            [
                "812.0148.0",
                "525.0"
            ]
        ],
        "center": [
            "812.074",
            "525.024"
        ]
    },
        "label": "car",
        "color": "red",
        "x": "817.0",
        "y": "524.0",
        "width": "142.0",
        "height": "50.0",
        "type": "rect",
        "id": "55283634-e55d-478e-9a68-056a501d60c6",
        "points": [
            [
                "817.0",
                "524.0"
            ],
            [
                "817.0",
                "524.050.0"
            ],
            [
                "817.0142.0",
                "524.050.0"
            ],
            [
                "817.0142.0",
                "524.0"
            ]
        ],
        "center": [
            "817.071",
            "524.025"
        ]
    },
select encode(content, 'escape')::json->'spans'->0->'center' as spans from example;
...
[565,176.95]
["811.074","525.024.5"]      <==== Invalid
["814.071.5","524.024.5"]    <==== Invalid
...
select encode(content, 'escape')::json->'spans'->0->'points' as spans from example;
...
[[523,80],[523,291.9],[647,291.9],[647,80]]
[["814.0","524.0"],["814.0","524.049.0"],["814.0143.0","524.049.0"],["814.0143.0","524.0"]]
[["767.0","410.0"],["767.0","410.0163.0"],["767.0186.0","410.0163.0"],["767.0186.0","410.0"]]
...

Prodigy version: "1.11.4"

Hi! This is very strange and I couldn't immediately reproduce this :thinking: I tried annotating an image and exported the data and I get back the correct floats.

Is there any postprocessing step that you're running after exporting the data when producing it? Does exporting the JSON with db-out give you strings? And if that's the case, which browser are you using? Can you double-check that the data in the web app is correct? One easy way to do that is to enable JavaScript by setting something like "javascript": "console.log('js enabled!')" in your prodigy.json and then typing window.prodigy.content into your developer console in the browser.

Thanks @ines for the reply.

Is there any postprocessing step that you're running

Nope.

Does exporting the JSON with db-out give you strings

yes. In fact that is how we came to know about the problem. The db-out json was having these weird float and to rule out db-out recipe as the issue, we checked the db directly and found these values in the db also.

Will try the javascript debugging and let you know. Thanks!

Thanks for the update and that's definitely strange. Could you also share the Prodigy version and operating system / browser + version you're using? If the JSON in the browser already has the strings, that would indicate that it's happening in the browser, although I don't really understand how this could be happening :thinking: