Refactor models API - #18
Merged
Merged
Conversation
This commit implements how I want models to work
going forward. The target API looks like this now:
```rust
use cellcast::models::StarDist2D;
let sd = StarDist2D::init_fluo("path/to/weights.bpk", gpu=true);
let labels = sd.predict_fluo(&data);
```
The versatile name refers to the pretrained model that has been trained on a large variety of data. But any model can be used with the networks. Thus they are now renamed "fluo" and "he" in refeference to the type of data they target.
Member
Author
|
Cellcast core compiles but I need to update the pyo3 Python bindings. |
elevans
marked this pull request as ready for review
June 25, 2026 14:09
Member
Author
|
Overall I like the way the new API works. It allows for custom weights to now be used with cellcast's StarDist models. Going forward new additions to cellcast should follow this pattern. There is still more to do like clean up the docstring and optimizations. Additionally I want to re-work on the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the
modelsAPI to allow custom.bpkformat weights.