lcy0604 / CTRNet

This repository is the implementation of "Don't Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

无法运行test.py,使用官方例子图片,提示(需要整数元组)错误TypeError: conv_transpose2d(): argument 'dilation' (position 8) must be tuple of ints, not tuple

evanlin88 opened this issue · comments

@lcy0604

  1. 下载数据集示例(只留1.jpg文件)到test_img,并执行 python flist.py --path test_img/ --output ./datasets/enstext_test_img.flis
    成功执行:
    loading test_img/
    loading test_img/structure_im
    loading test_img/all_images
    loading test_img/all_gts
    loading test_img/all_labels

  2. 执行CUDA_VISIBLE_DEVICES=0 python test.py --bs 1 --gpus 1 --img_flist datasets/enstext_test_img.flist --model models/CTRNet_model_final.pt --save_path ./results --save
    执行效果:

/data/ctrnet/CTRNet-master/dataset.py:270: RuntimeWarning: invalid value encountered in divide
cosin = (square_distance - square_distance_1 - square_distance_2) / \

flist: datasets/enstext_test_img.flist
str flist: datasets/enstext_test_img.flist
isfile: ['test_img/all_images/1.jpg' 'test_img/all_labels/1.jpg'
'test_img/structure_im/1.jpg']
Total instance number: 3
===> Loaded datasets
....

TypeError: conv_transpose2d(): argument 'dilation' (position 8) must be tuple of ints, not tuple

是否可以提供一下依赖包版本?requirement.txt文件,下面是当前环境的版本
Package Version


anyio 4.2.0
certifi 2023.11.17
charset-normalizer 3.3.2
exceptiongroup 1.2.0
h11 0.14.0
httpcore 1.0.2
httpx 0.26.0
idna 3.6
imageio 2.33.1
inplace-abn 1.1.0
lazy_loader 0.3
networkx 3.1
numpy 1.24.4
opencv-python 4.9.0.80
packaging 23.2
pillow 10.2.0
pip 23.3.1
polygon 1.1.5
Polygon3 3.0.9.1
pyclipper 1.3.0.post5
PyWavelets 1.4.1
requests 2.31.0
scikit-image 0.21.0
scipy 1.10.1
setuptools 68.2.2
shapely 2.0.2
sniffio 1.3.0
tifffile 2023.7.10
torch 1.9.0+cu111
torchaudio 0.9.0
torchlight 1.0
torchvision 0.10.0+cu111
typing_extensions 4.9.0
urllib3 2.1.0
websocket-client 1.7.0
websockets 12.0
wheel 0.41.2

原来是版本冲突问题,降了版本后能运行