-
Notifications
You must be signed in to change notification settings - Fork 128
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
91d046e
commit 4767d6d
Showing
1 changed file
with
8 additions
and
3 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 |
---|---|---|
@@ -1,22 +1,27 @@ | ||
from typing import Dict, List, Union | ||
|
||
from PIL.Image import Image as ImageType | ||
|
||
|
||
class Classifier: | ||
def __init__(self, prompt: str): | ||
self.prompt = prompt | ||
|
||
def __call__(self: image: Union[str, Image]) -> List[Dict]: | ||
def __call__(self, image: Union[str, ImageType]) -> List[Dict]: | ||
raise NotImplementedError | ||
|
||
|
||
class Detector: | ||
def __init__(self, prompt: str): | ||
self.prompt = prompt | ||
|
||
def __call__(self: image: Union[str, Image]) -> List[Dict]: | ||
def __call__(self, image: Union[str, ImageType]) -> List[Dict]: | ||
raise NotImplementedError | ||
|
||
|
||
class Segmentor: | ||
def __init__(self, prompt: str): | ||
self.prompt = prompt | ||
|
||
def __call__(self: image: Union[str, Image]) -> List[Dict]: | ||
def __call__(self, image: Union[str, ImageType]) -> List[Dict]: | ||
raise NotImplementedError |