Skip to content

Conversation

@piever
Copy link

@piever piever commented Jan 26, 2026

First of all, congrats on this amazing project, we've been using it successfully to segment large microscopy data.

Unforunately, I have encountered a bug trying to use cellpose.train.train_seg without loading all the files in memory, eg:

train_seg(
    net = model.net,
    train_files = img_paths_list,
    train_labels_files = flow_paths_list,
    channel_axis = 0,
    load_files = False,
    n_epochs = 2
)

The issue seems to be that _get_batch receives a channel_axis kwarg (see here) that it cannot handle.

This simple patch fixes our usecase. Sorry for not adding extra tests, I'm not fully familiar with how the test suite is organized and couldn't understand how to add one, but any test that uses load_files = False should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant