ZettaAI / zetta_utils

MIT License
11 stars 0 forks source link

Multistage alignment issue when stages transition from `shrink_processing_chunk: true` to `false` #410

Open nkemnitz opened 1 year ago

nkemnitz commented 1 year ago

BBOX: {

"@type": "BBox3D.from_coords"
start_coord: [0, 0, 3452]
end_coord: [384, 512, 3453]
resolution: [1024, 1024, 30]

}

Poor alignment happens at 64nm, which is the first stage that does not use shrink_processing_chunk. Maybe because using the 128nm field as input causes a weird offset change?

Issue is avoided by keeping shrink_processing_chunk=False for all resolutions.

supersergiy commented 1 year ago

@nkemnitz do you have an example spec to reproduce this?

supersergiy commented 1 year ago

@nkemnitz bump

nkemnitz commented 1 year ago

No, at least not reliably. It used to be https://github.com/ZettaAI/zetta_utils/blob/nkem/zfish-enc/specs/nico/inference/zfish/0_encoding_zfish/1_Zfish_prepare_aced.cue#L79-L80 with the above bounding box.

But subchunkable has significantly changed since then with expand_bbox_processing, expand_bbox_backend and expand_bbox_resolution. I tried replacing expand_bbox with expand_bbox_processing and it does complain about unaligned processing chunk sizes. Whether that means the bug is fixed, or expand_bbox_processing is not a 1:1 replacement, I don't know.