Created
May 15, 2020 04:48
-
-
Save AlexDel/98ea500eb30f6af25f3c2b0df453efdc to your computer and use it in GitHub Desktop.
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
from mypy_extensions import TypedDict | |
from typing import List | |
class RegionAnnotation(TypedDict): | |
x: int | |
y: int | |
height: int | |
width: int | |
name: str | |
class TextDict(TypedDict): | |
name: str | |
text: str | |
def render_regions_on_image(image: np.ndarray, regions: List[RegionAnnotation], texts: List[TextDict]) -> np.ndarray: | |
... | |
return image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment