GXYM / TextBPN-Plus-Plus

Arbitrary Shape Text Detection via Boundary Transformer;The paper at: https://arxiv.org/abs/2205.05320, which has been accepted by IEEE Transactions on Multimedia (T-MM 2023).
177 stars 38 forks source link

There is no requirements.txt #37

Open urevic opened 9 months ago

urevic commented 9 months ago

The requirements.txt file is missing so it took some time for me to figure out all the dependencies. For me it works it least for CPU infering with the following Conda environment:

This file may be used to create an environment using:

$ conda create --name --file

platform: linux-64

_libgcc_mutex=0.1=main _openmp_mutex=5.1=1_gnu blas=1.0=mkl brotli-python=1.0.9=py38h6a678d5_7 ca-certificates=2023.12.12=h06a4308_0 certifi=2024.2.2=py38h06a4308_0 cffi=1.16.0=py38h5eee18b_0 charset-normalizer=2.0.4=pyhd3eb1b0_0 contourpy=1.1.1=pypi_0 cudatoolkit=11.8.0=h6a678d5_0 cycler=0.12.1=pypi_0 easydict=1.13=pypi_0 filelock=3.13.1=py38h06a4308_0 fonttools=4.49.0=pypi_0 freetype=2.12.1=h4a9f257_0 fsspec=2023.10.0=py38h06a4308_0 gmp=6.2.1=h295c915_3 gmpy2=2.1.2=py38heeb90bb_0 idna=3.4=py38h06a4308_0 importlib-resources=6.1.2=pypi_0 intel-openmp=2023.1.0=hdb19cb5_46306 jinja2=3.1.3=py38h06a4308_0 jpeg=9e=h5eee18b_1 kiwisolver=1.4.5=pypi_0 lcms2=2.12=h3be6417_0 ld_impl_linux-64=2.38=h1181459_1 lerc=3.0=h295c915_0 libdeflate=1.17=h5eee18b_1 libffi=3.4.4=h6a678d5_0 libgcc-ng=11.2.0=h1234567_1 libgfortran-ng=11.2.0=h00389a5_1 libgfortran5=11.2.0=h1234567_1 libgomp=11.2.0=h1234567_1 libpng=1.6.39=h5eee18b_0 libprotobuf=3.20.3=he621ea3_0 libstdcxx-ng=11.2.0=h1234567_1 libtiff=4.5.1=h6a678d5_0 libwebp-base=1.3.2=h5eee18b_0 lxml=5.1.0=pypi_0 lz4-c=1.9.4=h6a678d5_0 markupsafe=2.1.3=py38h5eee18b_0 matplotlib=3.7.5=pypi_0 mkl=2023.1.0=h213fc3f_46344 mkl-service=2.4.0=py38h5eee18b_1 mkl_fft=1.3.8=py38h5eee18b_0 mkl_random=1.2.4=py38hdb19cb5_0 mpc=1.1.0=h10f8cd9_1 mpfr=4.0.2=hb69a4c5_1 mpmath=1.3.0=py38h06a4308_0 ncurses=6.4=h6a678d5_0 networkx=3.1=py38h06a4308_0 ninja=1.10.2=h06a4308_5 ninja-base=1.10.2=hd09550d_5 numpy=1.24.3=py38hf6e8229_1 numpy-base=1.24.3=py38h060ed82_1 opencv-python=4.4.0.46=pypi_0 openjpeg=2.4.0=h3ad879b_0 openssl=3.0.13=h7f8727e_0 packaging=23.1=py38h06a4308_0 pillow=10.2.0=py38h5eee18b_0 pip=23.3.1=py38h06a4308_0 platformdirs=3.10.0=py38h06a4308_0 pooch=1.7.0=py38h06a4308_0 pycparser=2.21=pyhd3eb1b0_0 pyparsing=3.1.1=pypi_0 pysocks=1.7.1=py38h06a4308_0 python=3.8.18=h955ad1f_0 python-dateutil=2.9.0.post0=pypi_0 pytorch=2.2.0=cpu_py38hdc00b08_0 readline=8.2=h5eee18b_0 requests=2.31.0=py38h06a4308_1 scipy=1.10.1=py38hf6e8229_1 setuptools=68.2.2=py38h06a4308_0 shapely=2.0.3=pypi_0 six=1.16.0=pypi_0 sqlite=3.41.2=h5eee18b_0 sympy=1.12=py38h06a4308_0 tbb=2021.8.0=hdb19cb5_0 tk=8.6.12=h1ccaba5_0 torchvision=0.15.2=cuda118py38h196c800_0 typing_extensions=4.9.0=py38h06a4308_1 urllib3=2.1.0=py38h06a4308_1 wheel=0.41.2=py38h06a4308_0 xz=5.4.6=h5eee18b_0 zipp=3.17.0=pypi_0 zlib=1.2.13=h5eee18b_0 zstd=1.5.5=hc292b87_0

7998857 commented 8 months ago

For me this pip environment worked (ubuntu 20.04):

pip freeze

contourpy==1.1.1
cycler==0.12.1
easydict==1.13
filelock==3.13.1
fonttools==4.49.0
fsspec==2024.2.0
greenlet==3.0.3
importlib_resources==6.1.3
Jinja2==3.1.3
kiwisolver==1.4.5
lxml==5.1.0
MarkupSafe==2.1.5
matplotlib==3.7.5
mpmath==1.3.0
networkx==3.1
numpy==1.24.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.19.3
nvidia-nvjitlink-cu12==12.4.99
nvidia-nvtx-cu12==12.1.105
opencv-python==4.9.0.80
packaging==23.2
pillow==10.2.0
pkg_resources==0.0.0
protobuf==4.25.3
psycopg2-binary==2.9.9
pyparsing==3.1.2
python-dateutil==2.9.0.post0
scipy==1.10.1
shapely==2.0.3
six==1.16.0
SQLAlchemy==2.0.28
sympy==1.12
tensorboardX==2.6.2.2
torch==2.2.1
torchvision==0.17.1
triton==2.2.0
typing_extensions==4.10.0
zipp==3.17.0

However, I had to change one line of code in the train_textBPN.py to make the training work: Uncomment the part

# generator=torch.Generator(device=cfg.device)

in the definition of the train_dataloader (currently line 235 in train_textBPN.py)

lyysl commented 2 months ago

Thx. I want to ask how can I use the test and demo for using cpu?