Add type information to docstrings
This commit is contained in:
parent
548d7a1f9c
commit
733e5f6fb6
@ -7,8 +7,8 @@ from torchvision import transforms
|
|||||||
def load_models(yolo_path: str, resnet_path: str):
|
def load_models(yolo_path: str, resnet_path: str):
|
||||||
"""Load the models for two-stage classification.
|
"""Load the models for two-stage classification.
|
||||||
|
|
||||||
:param yolo_path: path to yolo weights
|
:param str yolo_path: path to yolo weights
|
||||||
:param resnet_path: path to resnet weights
|
:param str resnet_path: path to resnet weights
|
||||||
:returns: tuple of models
|
:returns: tuple of models
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -25,8 +25,8 @@ def detect(img_path: str, yolo_path: str, resnet_path: str):
|
|||||||
healthy or wilted.
|
healthy or wilted.
|
||||||
|
|
||||||
:param str img_path: path to image
|
:param str img_path: path to image
|
||||||
:param yolo_path: path to yolo weights
|
:param str yolo_path: path to yolo weights
|
||||||
:param resnet_path: path to resnet weights
|
:param str resnet_path: path to resnet weights
|
||||||
:returns: tuple of recent image and dict of bounding boxes and
|
:returns: tuple of recent image and dict of bounding boxes and
|
||||||
their predictions
|
their predictions
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ def get_cutout(img, xmin, xmax, ymin, ymax):
|
|||||||
object classification model.
|
object classification model.
|
||||||
|
|
||||||
:param img: opencv2 image object in BGR
|
:param img: opencv2 image object in BGR
|
||||||
:param xmin: start of bounding box on x axis
|
:param int xmin: start of bounding box on x axis
|
||||||
:param xmax: end of bounding box on x axis
|
:param int xmax: end of bounding box on x axis
|
||||||
:param ymin: start of bounding box on y axis
|
:param int ymin: start of bounding box on y axis
|
||||||
:param ymax: end of bounding box on y axis
|
:param int ymax: end of bounding box on y axis
|
||||||
:returns: tensor of cropped image in BGR
|
:returns: tensor of cropped image in BGR
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user