зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-29 13:06:04 +02:00
fixed test
Этот коммит содержится в:
родитель
a6ea571478
Коммит
31b006311a
@ -19,21 +19,11 @@ TEST_IMAGE_12 = "./test/data/pic1.png"
|
||||
|
||||
|
||||
def test_read_img():
|
||||
test_img = ms.read_img(TEST_IMAGE_2)
|
||||
assert numpy.array(test_img)[257][34] == [70, 66, 63]
|
||||
my_dict = {}
|
||||
test_img = ms.MultimodalSearch.read_img(my_dict, TEST_IMAGE_2)
|
||||
assert list(numpy.array(test_img)[257][34]) == [70, 66, 63]
|
||||
|
||||
# def test_load_feature_extractor_model_blip2():
|
||||
# multimodal_device = device("cuda" if cuda.is_available() else "cpu")
|
||||
# (model, vis_processors, txt_processors,) = ms.load_feature_extractor_model_blip2(multimodal_device)
|
||||
|
||||
mydict = {}
|
||||
for img_path in images:
|
||||
id_ = os.path.splitext(os.path.basename(img_path))[0]
|
||||
mydict[id_] = {"filename": img_path}
|
||||
|
||||
for key in mydict:
|
||||
mydict[key] = sm.SummaryDetector(mydict[key]).analyse_image()
|
||||
keys = list(mydict.keys())
|
||||
assert len(mydict) == 12
|
||||
for key in keys:
|
||||
assert len(mydict[key]["3_non-deterministic summary"]) == 3
|
||||
# def test_load_feature_extractor_model_blip2():
|
||||
# multimodal_device = device("cuda" if cuda.is_available() else "cpu")
|
||||
# (model, vis_processors, txt_processors,) = ms.load_feature_extractor_model_blip2(multimodal_device)
|
||||
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user