Skip to content

Commit

Permalink
Enable test_load_from_ultralytics_voc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqwang committed Jan 23, 2022
1 parent 922ded4 commit eed04f4
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,11 @@ def test_load_from_ultralytics(
assert len(model_info["strides"]) == 4 if use_p6 else 3


@pytest.mark.skip(reason="Due to #235")
@pytest.mark.parametrize(
"arch, version, upstream_version, hash_prefix",
[("yolov5s-VOC", "r4.0", "v5.0", "23818cff")],
)
def test_load_from_ultralytics_voc(
arch: str,
version: str,
upstream_version: str,
hash_prefix: str,
):
def test_load_from_ultralytics_voc(arch: str, version: str, upstream_version: str, hash_prefix: str):
img_path = "test/assets/bus.jpg"

base_url = "https://github.com/ultralytics/yolov5/releases/download/"
Expand All @@ -85,11 +79,7 @@ def test_load_from_ultralytics_voc(
out_from_yolov5 = outs[0]

# Define yolort model
model_yolort = YOLO.load_from_yolov5(
checkpoint_path,
score_thresh=conf,
version=version,
)
model_yolort = YOLO.load_from_yolov5(checkpoint_path, score_thresh=conf, version=version)
model_yolort.eval()
with torch.no_grad():
out_from_yolort = model_yolort(img[None])
Expand Down

0 comments on commit eed04f4

Please sign in to comment.