Skip to content

Instantly share code, notes, and snippets.

Created May 15, 2020 04:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AlexDel/98ea500eb30f6af25f3c2b0df453efdc to your computer and use it in GitHub Desktop.
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