buda-base / scam

segment and crop anything
Apache License 2.0
2 stars 1 forks source link

adding margins to annotation generation #57

Closed TBRC-Travis closed 6 months ago

TBRC-Travis commented 7 months ago

I'd like to have an option when running SCAM to add a fixed margin to the annotation dimensions that SCAM generates which will increase the dimensions of the annotation box by a fixed amount of pixels. (Basically the opposite of the "Cut at fixed resolution" option.

For example, when running SCAM against a manuscript like this:

W3CN57_detection

it detects the edge of where the text is found and I would like to be able to increase the box dimensions by say, 300 pixels on all sides. Being able to designate a different amount of pixels for the X and Y axis would be ideal.

eroux commented 6 months ago

@berger-n I think this would be straightforward to add in the UI right? the parameter is expand_to_fixed instead of cut_at_fixed

berger-n commented 6 months ago

@eroux indeed! looks done: https://scamqc.bdrc.io/?folder=Travis%2FW1ER158%2Farchive%2FW1ER158-I1ER911%2F not sure how/where to fully test it though?

image

TBRC-Travis commented 6 months ago

@berger-n I have a volume I can test this on. will keep you posted.

TBRC-Travis commented 6 months ago

I tested this out on Travis/W3CN57/W3CN57-I3CN287/ but it doesn't appear to do anything. I tried expanding the annotation to 3200 x 500 and nothing changed.

eroux commented 6 months ago

it wasn't implemented on the server side, it seems to be working now

eroux commented 6 months ago

closing as fixed