зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-30 13:36:04 +02:00
* deleted lavis from utils * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed test_objects * added 'not gcv' to CI * fixed multimodal search and summary tests * disable doc build on PR for now * restrict ipywidgets version to avoid dummycomm error * limit deepface version * original repositories for retinaface lavis * update gcv test results * update display test outputs * update test env * run all tests * wo xdist to avoid segfault * remove widgets ref * skip long-running tests * skip long * verbose codecov upload * refactor summary test 2 * finish summary test refactor * reduce memory overhead of SummaryDetector * remove VQA models from self * remove VQA models from self * update notebook for changes * update notebook for changes * fixed multimodal search tests * fixed tests in multimodal search after precommit * run all tests * update doc notebook for summary changes * skip long-running multimodal * exclude blip2 from testing --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
29 строки
1.1 KiB
Python
29 строки
1.1 KiB
Python
import json
|
|
import misinformation.display as misinf_display
|
|
|
|
|
|
def test_explore_analysis_faces(get_path):
|
|
mydict = {"IMG_2746": {"filename": get_path + "IMG_2746.png"}}
|
|
temp = misinf_display.explore_analysis(mydict, identify="faces") # noqa
|
|
temp = None # noqa
|
|
with open(get_path + "example_faces.json", "r") as file:
|
|
outs = json.load(file)
|
|
mydict["IMG_2746"].pop("filename", None)
|
|
for im_key in mydict.keys():
|
|
sub_dict = mydict[im_key]
|
|
for key in sub_dict.keys():
|
|
assert sub_dict[key] == outs[key]
|
|
|
|
|
|
def test_explore_analysis_objects(get_path):
|
|
mydict = {"IMG_2809": {"filename": get_path + "IMG_2809.png"}}
|
|
temp = misinf_display.explore_analysis(mydict, identify="objects") # noqa
|
|
temp = None # noqa
|
|
with open(get_path + "example_analysis_objects.json", "r") as file:
|
|
outs = json.load(file)
|
|
mydict["IMG_2809"].pop("filename", None)
|
|
for im_key in mydict.keys():
|
|
sub_dict = mydict[im_key]
|
|
for key in sub_dict.keys():
|
|
assert sub_dict[key] == outs[key]
|