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

Fixes a small bug with detection_filter so that instance methods work as expected #308

Merged

Conversation

brendancol
Copy link
Collaborator

@brendancol brendancol commented Aug 19, 2024

Hypothetically one could create a detection filter
like:

class DetectionFilter():

    def __init__(self, data):
        self.data = data

    def __call__(self, box, mask, logit, phrase, i):
        return phrase == self.data

sam.predict(..., detection_filter=DetectionFilter(data='mystring'))

  should work...so hypothetically one could create a detection filter
  like:

```python
class DetectionFilter():

    def init(self, data):
        self.data = data

    def __call__(self, box, mask, logit, phrase, i):
        return phrase == self.data

sam.predict(..., detection_filter=DetectionFilter(data='mystring'))
```
@giswqs giswqs merged commit 1c54f5d into opengeos:main Aug 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants