comic / grand-challenge.org

A platform for end-to-end development of machine learning solutions in biomedical imaging
https://grand-challenge.org
Apache License 2.0
167 stars 49 forks source link

Add bounding box configuration for point annotations #3367

Closed pkcakeout closed 3 weeks ago

pkcakeout commented 3 weeks ago

Pitch https://github.com/DIAGNijmegen/rse-roadmap/issues/319

Open question: Does this need tests. It feels kind of silly to me to add tests for this, but maybe?

pkcakeout commented 3 weeks ago

Thanks James!

I was on it already, but did not know why or how to get it working and wanted to call for help - and there it was already!

I was seeing this error in the logs:

postgres-1                  | 2024-06-05 12:55:04.636 UTC [2547] ERROR:  new row for relation "workstation_configs_windowpreset" violates check constraint "workstation_configs_windowpreset_either_fixed_or_percentile"
postgres-1                  | 2024-06-05 12:55:04.636 UTC [2547] DETAIL:  Failing row contains (64, foo, null, foo, 1, null, null, null).
postgres-1                  | 2024-06-05 12:55:04.636 UTC [2547] STATEMENT:  INSERT INTO "workstation_configs_windowpreset" ("title", "description", "slug", "width", "center", "lower_percentile", "upper_percentile") VALUES ('foo', NULL, 'foo', 1, NULL, NULL, NULL) RETURNING "workstation_configs_windowpreset"."id"

but maybe this was a red herring?

Will try your suggestion!

jmsmkn commented 3 weeks ago

Adding "point_bounding_box_size_mm": "0", to the posted data in the two tests or setting blank=True, (and ensuring you handle Nones alongside 0 in your client code) would solve it.

pkcakeout commented 3 weeks ago

Roger! Got it... I think. Allowed null and blank, this indeed did fix the tests!