예제 #1
0
def od_cup_anno_bboxes(tmp_session, od_cup_path) -> List[AnnotationBbox]:
    return [
        AnnotationBbox(
            left=61,
            top=59,
            right=273,
            bottom=244,
            label_name="cup",
            label_idx=0,
            im_path=od_cup_path,
        )
    ]
예제 #2
0
def test_annotation_bbox_from_array(anno_bbox):
    bbox_from_array = AnnotationBbox.from_array([0, 10, 100, 1000],
                                                label_idx=0)
    validate_bbox(bbox_from_array)
    assert type(bbox_from_array) == AnnotationBbox
예제 #3
0
def anno_bbox() -> "AnnotationBbox":
    return AnnotationBbox(left=0, top=10, right=100, bottom=1000, label_idx=0)
def test_annotation_bbox_from_array():
    bbox_from_array = AnnotationBbox.from_array([0, 10, 100, 1000],
                                                label_idx=0)
    validate_anno_bbox(bbox_from_array, label_idx=0)