Open lovelystrange opened 1 day ago
除了一些warning外,没看到error
/rebook
文件夹下是否有生成的.pyd文件?
README.md geometry.py init.py inpaint.cpython-310-darwin.so algorithm.py letters.py batch.py lib.py binarize.py mrcdi.py block.py neighbor.py collate.cpython-310-darwin.so newton.cpython-310-darwin.so crop.py sparse_rep.py dataset.py spliter.py dewarp.py test.py feature_sign.cpython-310-darwin.so training.py feature_sign_obsolete.py upscale.py
README.md geometry.py init.py inpaint.cpython-310-darwin.so algorithm.py letters.py batch.py lib.py binarize.py mrcdi.py block.py neighbor.py collate.cpython-310-darwin.so newton.cpython-310-darwin.so crop.py sparse_rep.py dataset.py spliter.py dewarp.py test.py feature_sign.cpython-310-darwin.so training.py feature_sign_obsolete.py upscale.py
已正确编译.so库文件,运行demo试试看吧
@deMacBook-Pro Tools % git clone https://github.com/osnsyc/Excerptor.git Cloning into 'Excerptor'... remote: Enumerating objects: 55, done. remote: Counting objects: 100% (20/20), done. remote: Compressing objects: 100% (15/15), done. remote: Total 55 (delta 6), reused 15 (delta 5), pack-reused 35 (from 1) Receiving objects: 100% (55/55), 87.69 MiB | 11.52 MiB/s, done. Resolving deltas: 100% (6/6), done. @deMacBook-Pro Tools % cd Excerptor
@deMacBook-Pro Excerptor % pip install -r requirements.txt Requirement already satisfied: Cython in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (3.0.11) Requirement already satisfied: opencv-python in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (4.10.0.84) Requirement already satisfied: scikit-image in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (0.24.0) Requirement already satisfied: scikit-learn in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (1.2.2) Requirement already satisfied: ultralytics in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (8.3.27) Requirement already satisfied: rapidocr-onnxruntime in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (1.3.25) Collecting rtmlib (from -r requirements.txt (line 7)) Downloading rtmlib-0.0.12-py3-none-any.whl.metadata (16 kB) Requirement already satisfied: numpy>=1.21.2 in /opt/homebrew/lib/python3.10/site-packages (from opencv-python->-r requirements.txt (line 2)) (1.26.4) Requirement already satisfied: scipy>=1.9 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (1.10.1) Requirement already satisfied: networkx>=2.8 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (2.8.4) Requirement already satisfied: pillow>=9.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (9.5.0) Requirement already satisfied: imageio>=2.33 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (2.36.0) Requirement already satisfied: tifffile>=2022.8.12 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (2024.9.20) Requirement already satisfied: packaging>=21 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (23.1) Requirement already satisfied: lazy-loader>=0.4 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image->-r requirements.txt (line 3)) (0.4) Requirement already satisfied: joblib>=1.1.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-learn->-r requirements.txt (line 4)) (1.2.0) Requirement already satisfied: threadpoolctl>=2.0.0 in /opt/homebrew/lib/python3.10/site-packages (from scikit-learn->-r requirements.txt (line 4)) (3.1.0) Requirement already satisfied: matplotlib>=3.3.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (3.7.2) Requirement already satisfied: pyyaml>=5.3.1 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (6.0) Requirement already satisfied: requests>=2.23.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (2.31.0) Requirement already satisfied: torch>=1.8.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (2.5.1) Requirement already satisfied: torchvision>=0.9.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (0.20.1) Requirement already satisfied: tqdm>=4.64.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (4.65.0) Requirement already satisfied: psutil in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (6.1.0) Requirement already satisfied: py-cpuinfo in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (9.0.0) Requirement already satisfied: pandas>=1.1.4 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (1.5.3) Requirement already satisfied: seaborn>=0.11.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (0.13.2) Requirement already satisfied: ultralytics-thop>=2.0.0 in /opt/homebrew/lib/python3.10/site-packages (from ultralytics->-r requirements.txt (line 5)) (2.0.10) Requirement already satisfied: pyclipper>=1.2.0 in /opt/homebrew/lib/python3.10/site-packages (from rapidocr-onnxruntime->-r requirements.txt (line 6)) (1.3.0.post6) Requirement already satisfied: six>=1.15.0 in /opt/homebrew/lib/python3.10/site-packages (from rapidocr-onnxruntime->-r requirements.txt (line 6)) (1.16.0) Requirement already satisfied: Shapely!=2.0.4,>=1.7.1 in /opt/homebrew/lib/python3.10/site-packages (from rapidocr-onnxruntime->-r requirements.txt (line 6)) (2.0.6) Requirement already satisfied: onnxruntime>=1.7.0 in /opt/homebrew/lib/python3.10/site-packages (from rapidocr-onnxruntime->-r requirements.txt (line 6)) (1.18.1) Requirement already satisfied: contourpy>=1.0.1 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (1.1.0) Requirement already satisfied: cycler>=0.10 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (4.41.1) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (1.4.4) Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /opt/homebrew/lib/python3.10/site-packages (from matplotlib>=3.3.0->ultralytics->-r requirements.txt (line 5)) (2.8.2) Requirement already satisfied: coloredlogs in /opt/homebrew/lib/python3.10/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (14.0) Requirement already satisfied: flatbuffers in /opt/homebrew/lib/python3.10/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (23.5.26) Requirement already satisfied: protobuf in /opt/homebrew/lib/python3.10/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (3.20.0) Requirement already satisfied: sympy in /opt/homebrew/lib/python3.10/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (1.13.1) Requirement already satisfied: pytz>=2020.1 in /opt/homebrew/lib/python3.10/site-packages (from pandas>=1.1.4->ultralytics->-r requirements.txt (line 5)) (2023.3) Requirement already satisfied: charset-normalizer<4,>=2 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.23.0->ultralytics->-r requirements.txt (line 5)) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.23.0->ultralytics->-r requirements.txt (line 5)) (3.4) Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.23.0->ultralytics->-r requirements.txt (line 5)) (1.26.16) Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.23.0->ultralytics->-r requirements.txt (line 5)) (2023.5.7) Requirement already satisfied: filelock in /opt/homebrew/lib/python3.10/site-packages (from torch>=1.8.0->ultralytics->-r requirements.txt (line 5)) (3.12.0) Requirement already satisfied: typing-extensions>=4.8.0 in /opt/homebrew/lib/python3.10/site-packages (from torch>=1.8.0->ultralytics->-r requirements.txt (line 5)) (4.12.2) Requirement already satisfied: jinja2 in /opt/homebrew/lib/python3.10/site-packages (from torch>=1.8.0->ultralytics->-r requirements.txt (line 5)) (3.1.2) Requirement already satisfied: fsspec in /opt/homebrew/lib/python3.10/site-packages (from torch>=1.8.0->ultralytics->-r requirements.txt (line 5)) (2023.5.0) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /opt/homebrew/lib/python3.10/site-packages (from sympy->onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (1.3.0) Requirement already satisfied: humanfriendly>=7.1 in /opt/homebrew/lib/python3.10/site-packages (from coloredlogs->onnxruntime>=1.7.0->rapidocr-onnxruntime->-r requirements.txt (line 6)) (10.0) Requirement already satisfied: MarkupSafe>=2.0 in /opt/homebrew/lib/python3.10/site-packages (from jinja2->torch>=1.8.0->ultralytics->-r requirements.txt (line 5)) (2.1.3) Downloading rtmlib-0.0.12-py3-none-any.whl (45 kB) Installing collected packages: rtmlib Successfully installed rtmlib-0.0.12
[notice] A new release of pip is available: 24.2 -> 24.3.1 [notice] To update, run: python3.10 -m pip install --upgrade pip @deMacBook-Pro Excerptor % python3.10 setup.py build_ext Compiling inpaint.pyx because it changed. Compiling newton.pyx because it changed. Compiling collate.pyx because it changed. Compiling feature_sign.pyx because it changed. [1/4] Cythonizing collate.pyx [2/4] Cythonizing feature_sign.pyx [3/4] Cythonizing inpaint.pyx [4/4] Cythonizing newton.pyx In file included from inpaint.c:1240: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929: /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
warning "Using deprecated NumPy API, disable it with " \
^ inpaint.c:8864:26: warning: code will never be executed [-Wunreachable-code] module = PyImport_ImportModuleLevelObject( ^
~~~~~~~ 2 warnings generated. In file included from newton.c:1240: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929: /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]warning "Using deprecated NumPy API, disable it with " \
^ newton.c:10593:26: warning: code will never be executed [-Wunreachable-code] module = PyImport_ImportModuleLevelObject( ^
~~~~~~~ newton.c:4700:15: warning: unused function 'pyx_f_6newton_poly_eval_verbose' [-Wunused-function] static double __pyx_f_6newton_poly_eval_verbose(PyArrayObject *pyx_v_coef, double __pyx_v_x) { ^ 3 warnings generated. In file included from collate.c:1240: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929: /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]warning "Using deprecated NumPy API, disable it with " \
^ collate.c:10977:26: warning: code will never be executed [-Wunreachable-code] module = PyImport_ImportModuleLevelObject( ^
~~~~~~~ 2 warnings generated. In file included from feature_sign.c:1240: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929: /opt/homebrew/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]warning "Using deprecated NumPy API, disable it with " \
^ feature_sign.c:12457:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough] CYTHON_FALLTHROUGH; ^ feature_sign.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
define CYTHON_FALLTHROUGH attribute((fallthrough))
feature_sign.c:12468:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough] CYTHON_FALLTHROUGH; ^ feature_sign.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
define CYTHON_FALLTHROUGH attribute((fallthrough))
feature_sign.c:13059:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough] CYTHON_FALLTHROUGH; ^ feature_sign.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
define CYTHON_FALLTHROUGH attribute((fallthrough))
feature_sign.c:13065:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough] CYTHON_FALLTHROUGH; ^ feature_sign.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
define CYTHON_FALLTHROUGH attribute((fallthrough))
feature_sign.c:13229:26: warning: code will never be executed [-Wunreachable-code] module = PyImport_ImportModuleLevelObject( ^
~~~~~~~ feature_sign.c:4914:23: warning: unused function 'pyx_f_12feature_sign_row_square_norm' [-Wunused-function] static PyArrayObject *pyx_f_12feature_sign_row_square_norm(PyArrayObject *__pyx_v_A) { ^ 7 warnings generated.