baidut / fastiqa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in demo_patchVQ: Can't pickle local object

mzalaki00 opened this issue · comments

hi
when i run
logger.remove()
logger.add(sys.stderr, level="SUCCESS")
dbinfo = load_dbinfo(JSON_FILE)
print('Extract 2d features')
PatchVQ.roipool(LegacyRoIPoolModel(), dbinfo, featname='paq2piq', bs=32, clip_size=1)
PatchVQ.soipool('paq2piq', dbinfo)

print('Extract 3d features')
PatchVQ.roipool(RoIPoolModel(backbone=r3d18_K_200ep), dbinfo, featname='r3d18', bs=1, clip_num=40, clip_size=16)
PatchVQ.soipool('r3d18', dbinfo)

in demo_patchVQ i get below error:

Extract 2d features
2022-05-17 10:51:26.742 | WARNING | fastiqa.paq2piq._roi_pool:init:128 - roipool: size = (2, 2), scale = 1/32
2022-05-17 10:51:28.190 | WARNING | fastiqa.bunch:setattr:213 - setattr roi_col not existed
2022-05-17 10:51:28.190 | WARNING | fastiqa.bunch:setattr:213 - setattr vid_id not existed
2022-05-17 10:51:28.190 | WARNING | fastiqa.bunch:setattr:213 - setattr split_mode not existed
Processing: G005: 0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\fastiqa\patchVQ.py", line 27, in
PatchVQ.roipool(LegacyRoIPoolModel(), dbinfo, featname='paq2piq', bs=32, clip_size=1)
File "C:\Users\fastiqa\fastiqa\patchvq\all.py", line 193, in roipool
e.run(process)
File "C:\Users\fastiqa\fastiqa\iqa_exp.py", line 191, in run
func(learn)
File "C:\Users\fastiqa\fastiqa\patchvq\all.py", line 186, in process
get_features(x, featname, bs=bs, vid_id=vid_id)
File "C:\Users\fastiqa\fastiqa\patchvq\all.py", line 61, in get_features
....
File "C:\Users\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'SingleVideo2MOS.get_block..'