Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow napari GUI to accept custom weights #460

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cellfinder/core/classify/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
workers=workers,
)

if trained_model and trained_model.suffix == ".h5":
print(

Check warning on line 72 in cellfinder/core/classify/classify.py

View check run for this annotation

Codecov / codecov/patch

cellfinder/core/classify/classify.py#L72

Added line #L72 was not covered by tests
"Weights provided in place of the model, "
"loading weights into default model."
)
model_weights = trained_model
trained_model = None

Check warning on line 77 in cellfinder/core/classify/classify.py

View check run for this annotation

Codecov / codecov/patch

cellfinder/core/classify/classify.py#L76-L77

Added lines #L76 - L77 were not covered by tests

model = get_model(
existing_model=trained_model,
model_weights=model_weights,
Expand Down
Loading