computer-vision/vision/util/__init__.py

8 lines
201 B
Python

from vision.model import Image
from typing import List
import numpy as np
def get_category_histogram(images: List[Image], bins: int):
return np.histogram([i.category for i in images], bins=bins)