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.
I put in a new finetuned object detection model and recipe called "ObjectAwareModel_Cell_FT" and "Mobile SAM Finetuned" respectively. It has a FasterRCNN_MobileNet backbone, and was finetuned on the entirety of the Cellpose training images and labels (after converting the ground-truth segmentations to bounding boxes) for a few epochs until I got tired of waiting. Still probably plenty of room to optimize, but it's a start.
The model performs respectably well on "cellular" images, whereas the original MobileSAMv2 (pretrained YOLO) model would often fail. However, it simultaneously performs worse on "general" images.
I also changed part of the code structure to be more object-oriented by creating some classes for object detectors. This was because I was starting to add repetitive functions every time I wanted to work on a new model. However, the API remains nearly the same, with
get_bounding_boxes
as being the major driver of object_detection, but now you need to select the detector_model between "YOLOv8" and "Finetuned". Names are only placeholders.