PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'tqdm' object has no attribute 'disable'

cnitker opened this issue · comments

(liveStream) ➜ BackgroundMattingV2 git:(master) ✗ python inference_video.py --model-type mattingrefine --model-backbone resnet101 --model-backbone-scale 0.25 --model-refine-mode thresholding --model-refine-sample-pixels 80000 --model-checkpoint ./checkpoints/pytorch_resnet101.pth --video-src /download/111/739fc6c9ae95c7b90905bdd674f5ca5d.mp4 --video-bgr conf/green_background.jpeg --video-resize 1080 1920 --output-dir download/222 --output-type com --video-target-bgr conf/ai_demo.png --device cpu
Traceback (most recent call last):
File "inference_video.py", line 182, in
for input_batch in tqdm(DataLoader(dataset, batch_size=1, pin_memory=True)):
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/tqdm/std.py", line 975, in init
total = len(iterable)
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 397, in len
return len(self._index_sampler)
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 243, in len
return (len(self.sampler) + self.batch_size - 1) // self.batch_size # type: ignore
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 70, in len
return len(self.data_source)
File "/Users/**/BackgroundMattingV2/dataset/zip.py", line 14, in len
return max(len(d) for d in self.datasets)
File "/Users/
/BackgroundMattingV2/dataset/zip.py", line 14, in
return max(len(d) for d in self.datasets)
ValueError: len() should return >= 0
Exception ignored in: <function tqdm.del at 0x1236cc3a0>
Traceback (most recent call last):
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/tqdm/std.py", line 1145, in del
self.close()
File "/Users/macbook-pro/miniconda3/envs/liveStream/lib/python3.8/site-packages/tqdm/std.py", line 1264, in close
if self.disable:
AttributeError: 'tqdm' object has no attribute 'disable'

Package Version


absl-py 1.4.0
aiofiles 23.1.0
aiohttp 3.8.4
aiosignal 1.3.1
aliyun-python-sdk-core 2.13.36
aliyun-python-sdk-kms 2.16.0
altair 5.0.0
anyio 3.6.2
appnope 0.1.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.0.5
async-timeout 4.0.2
attrs 23.1.0
Babel 2.12.1
backcall 0.2.0
bce-python-sdk 0.8.83
beautifulsoup4 4.12.2
bleach 4.1.0
blinker 1.6.2
brotlipy 0.7.0
cachetools 4.2.4
certifi 2023.5.7
cffi 1.15.1
chardet 5.1.0
charset-normalizer 3.1.0
click 8.1.3
colorama 0.4.6
colorlog 6.7.0
comm 0.1.2
contourpy 1.0.7
crcmod 1.7
cryptography 39.0.1
cycler 0.11.0
datasets 2.0.0
debugpy 1.5.1
decorator 4.4.2
defusedxml 0.7.1
dill 0.3.4
docopt 0.6.2
easydict 1.10
entrypoints 0.4
executing 0.8.3
fastapi 0.95.1
fastjsonschema 2.16.2
ffmpy 0.3.0
filelock 3.12.0
Flask 2.3.2
Flask-Babel 2.0.0
fonttools 4.39.4
frozenlist 1.3.3
fsspec 2023.5.0
future 0.18.3
google-auth 1.35.0
google-auth-oauthlib 0.4.6
gradio 3.30.0
gradio_client 0.2.4
grpcio 1.54.0
gunicorn 20.1.0
h11 0.14.0
httpcore 0.17.0
httpx 0.24.0
huggingface-hub 0.14.1
idna 3.4
imageio 2.28.1
imageio-ffmpeg 0.4.8
importlib-metadata 6.6.0
importlib-resources 5.12.0
ipykernel 6.19.2
ipython 8.12.0
ipython-genutils 0.2.0
ipywidgets 8.0.4
itsdangerous 2.1.2
jedi 0.18.1
jieba 0.42.1
Jinja2 3.1.2
jmespath 0.10.0
joblib 1.2.0
json5 0.9.6
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.1.0
jupyter-console 6.6.3
jupyter_core 5.3.0
jupyter-server 1.23.4
jupyterlab 3.5.3
jupyterlab-pygments 0.1.2
jupyterlab_server 2.22.0
jupyterlab-widgets 3.0.5
kiwisolver 1.4.4
kornia 0.4.1
linkify-it-py 2.0.2
lxml 4.9.2
Markdown 3.4.3
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.7.1
matplotlib-inline 0.1.6
mdit-py-plugins 0.3.3
mdurl 0.1.2
mistune 0.8.4
moviepy 1.0.3
mpmath 1.3.0
multidict 6.0.4
multiprocess 0.70.12.2
nbclassic 0.5.5
nbclient 0.5.13
nbconvert 6.5.4
nbformat 5.7.0
nest-asyncio 1.5.6
networkx 3.1
notebook 6.5.4
notebook_shim 0.2.2
numpy 1.24.3
oauthlib 3.2.2
onnxruntime 1.6.0
opencv-python 4.4.0.44
orjson 3.8.12
oss2 2.17.0
packaging 23.1
paddle2onnx 1.0.5
paddlefsl 1.1.0
paddlehub 2.3.1
paddlenlp 2.5.2
pandas 2.0.1
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.5.0
pip 23.0.1
pipreqs 0.4.13
pkgutil_resolve_name 1.3.10
platformdirs 2.5.2
ply 3.11
proglog 0.1.10
prometheus-client 0.14.1
prompt-toolkit 3.0.36
protobuf 4.23.0
psutil 5.9.0
ptyprocess 0.7.0
pure-eval 0.2.2
pyarrow 12.0.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
pycryptodome 3.17
pydantic 1.10.7
pydub 0.25.1
Pygments 2.15.1
pyOpenSSL 23.0.0
pyparsing 3.0.9
PyQt5-sip 12.11.0
pyrsistent 0.19.3
PySocks 1.7.1
python-dateutil 2.8.2
python-multipart 0.0.6
pytz 2023.3
PyYAML 6.0
pyzmq 25.0.2
qtconsole 5.4.2
QtPy 2.2.0
rarfile 4.0
redis 4.5.5
requests 2.30.0
requests-oauthlib 1.3.1
responses 0.18.0
rich 13.3.5
rsa 4.9
scikit-learn 1.2.2
scipy 1.10.1
semantic-version 2.10.0
Send2Trash 1.8.0
sentencepiece 0.1.99
seqeval 1.2.2
setuptools 66.0.0
sip 6.6.2
six 1.16.0
sniffio 1.3.0
soupsieve 2.4
stack-data 0.2.0
starlette 0.26.1
sympy 1.12
tb-nightly 2.14.0a20230511
tensorboard 2.3.0
tensorboard-data-server 0.7.0
tensorboard-plugin-wit 1.8.1
terminado 0.17.1
threadpoolctl 3.1.0
tinycss2 1.2.1
toml 0.10.2
tomli 2.0.1
toolz 0.12.0
torch 1.7.1
torchvision 0.8.2
tornado 6.2
tqdm 4.65.0
traitlets 5.7.1
typer 0.9.0
typing_extensions 4.5.0
tzdata 2023.3
uc-micro-py 1.0.2
urllib3 1.26.15
uvicorn 0.22.0
visualdl 2.4.2
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 0.58.0
websockets 11.0.3
Werkzeug 2.3.4
wheel 0.38.4
widgetsnbextension 4.0.5
xxhash 3.2.0
yapf 0.33.0
yarg 0.1.9
yarl 1.9.2
zipp 3.15.0

mac 环境下 增加 --video_target_bgr 参数后就会提示以上错误,去掉该参数就可正常执行

i got same error in colab