-
Notifications
You must be signed in to change notification settings - Fork 83
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
✨ Add PatchPredictor
Engine
#865
✨ Add PatchPredictor
Engine
#865
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-define-engines-abc #865 +/- ##
==========================================================
+ Coverage 91.34% 91.47% +0.13%
==========================================================
Files 71 71
Lines 8892 8920 +28
Branches 1180 1185 +5
==========================================================
+ Hits 8122 8160 +38
+ Misses 751 744 -7
+ Partials 19 16 -3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Shan E Ahmed Raza <[email protected]>
Signed-off-by: Shan E Ahmed Raza <[email protected]>
PatchClassificatier
EnginePatchClassificaier
Engine
PatchClassificaier
EnginePatchClassifier
Engine
Signed-off-by: Shan E Ahmed Raza <[email protected]>
Thanks @measty. I have removed duplicated code as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Shan for doing this PR. All looks good to me. I only made a couple of minor comments.
However, I also have a question: I don't understand the reason for needing "PatchPredictor" class to serve "PatchClassifer" as a parent class. Would be great if you can let me know why you have decided to do it like this (you most probably have discussed it before, but I'm very forgetful, I'm sorry :-s).
Thanks @mostafajahanifar. This was a suggestion by Fayyaz to separate the two. In some cases, we do not need classification. For example, in semantic segmentor we need the raw predictions which are then converted to segmentation. In other cases, where we are building a pipeline where we need raw predictions instead of classification, this can simplify the pipeline by using just the predictor. |
- Move `infer_wsi` to `EngineABC`
- Use `EngineABC` as base class for `PatchClassifier`.
- `PatchPredictor` inherits from `PatchClassifier` - `PatchPredictor` adds deprecation warning.
PatchPredictor
Engine based onEngineABC
return_probabilities
option to Paramsmerge_predictions
option inPatchPredictor
engine.post_process_cache_mode
which allows running the algorithm onWSI
infer_wsi
for WSI inferencesave_wsi_output
as this is not required after post processing.merge_predictions
and fixes docstring in EngineABCRunParamscompile_model
is now moved to EngineABC init_calculate_scale_factor
class_dict
definition._get_zarr_array
is now a public functionget_zarr_array
inmisc
patch_predictions_as_annotations
runs the loop onpatch_coords
instead ofclass_probs