Skip to content

Relax requirement in __compute_extraction_shapes__ #66

@mgflast

Description

@mgflast

Hi,

The function compute_extraction_shapes currently requires that the dimensions of a tomogram are at least 2x the size of the training boxes. For tomograms acquired at a high magnification the reconstruction volume Z dimension can be quite small, which currently results in a limited training box size. For example my tomos are 82 x 474 x 348, so they would be just about right for a 80x80x80 training patch size, but the current implementation restricts the size to max 40 in Z.

The assertion makes sense for the X and Y axes where a validation split may be applied. But since the validation split is never going to be applied in Z, I would suggest changing the requirement of the Z dims to:

assert even.data.shape[0] >= sample_shape[0]

Or at least I think that could be useful. The reason this issue comes up for me is that I am training a single instance of a cryoCARE model on 25 merged cryoET datasets. Overall a patch shape of 80x80x80 would be good, but there are some high mag tomos which I now either have to exclude from the training data, or would require a smaller overall patch shape.

Best,
Mart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions