baidut / baidut/fastiqa

error in demo_patchVQ: Can't pickle local object

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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
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..'

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with fastiqa/patchvq/all.py at get_features and roipool, then follow the traceback into SingleVideo2MOS.get_block, where the local lambda is reported. Reproduce the demo_patchVQ call on the 2D feature extraction path and determine what change lets multiprocessing serialize the work; done means the demo proceeds past the pickle error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.