-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
455a297
commit a5b3c23
Showing
3 changed files
with
183 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ___Keras Segment Anything___ | ||
*** | ||
|
||
## Summary | ||
- [Github facebookresearch/segment-anything(https://github.com/facebookresearch/segment-anything) | ||
- [Github ChaoningZhang/MobileSAM](https://github.com/ChaoningZhang/MobileSAM) | ||
- Model weights ported from [Github ChaoningZhang/MobileSAM](https://github.com/ChaoningZhang/MobileSAM). | ||
## Models | ||
| Model | Params | FLOPs | Input | Download | | | ||
| ----- | ------ | ----- | ----- | -------- | --- | | ||
| | | | | | | | ||
## Usage | ||
- **Basic [Still not good, just working]** | ||
```py | ||
from keras_cv_attention_models import test_images | ||
from keras_cv_attention_models.segment_anything import sam | ||
mm = sam.SAM() | ||
image = test_images.dog_cat() | ||
points, labels = np.array([[400, 400]]), np.array([1]) | ||
masks, iou_predictions, low_res_masks = mm(image, points, labels) | ||
fig = mm.show(image, masks, iou_predictions, points=points, labels=labels, save_path='aa.jpg') | ||
``` | ||
![segment_anything](https://github.com/leondgarse/keras_cv_attention_models/assets/5744524/e3013d4e-1c28-426a-bb88-66144c8413ac) |
This file contains 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
Oops, something went wrong.