def test_process_sample_age_gender_recognition_retail():
    model = InferenceModel(model_path=model_path)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
Exemple #2
0
def test_process_sample_openvino_east_text_detector():
    model = InferenceModel(model_path=model_path)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
Exemple #3
0
def test_process_sample_face_detection_adas():
    model = InferenceModel(model_path=model_path)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
def test_process_sample_tiny_yolov4():
    model = InferenceModel(model_path=model_path, threshold=0.5)
    model.model_load(dai.OpenVINO.VERSION_2020_4)
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
def test_process_sample_lightwight_openpose():
    model = InferenceModel(model_path=model_path)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result, error=0.03)
Exemple #6
0
def test_process_sample_textboxes():
    model = InferenceModel(model_path=model_path, threshold=0.6)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
def test_process_sample_landmarks_regression_retail():
    model = InferenceModel(model_path=model_path, threshold=0.9)
    model.model_load()
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)
def test_process_sample_hand_pose_estimation():
    print(modelplace_api.__version__)
    model = InferenceModel(model_path=model_path, threshold=0.3)
    model.model_load(dai.OpenVINO.VERSION_2021_2)
    ret = model.process_sample(test_image)
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    del model
    assert is_equal(ret, test_result)