ybkscht / EfficientPose

Other
236 stars 67 forks source link

File "/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/skimage/__init__.py", line 122, in <module> from ._shared import geometry File "geometry.pyx", line 1, in init skimage._shared.geometry ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject #75

Closed monajalal closed 7 months ago

monajalal commented 7 months ago

How should I fix this?

(effpose) mona@ada:~/effpose/EfficientPose$ python setup.py build_ext --inplace
Compiling utils/compute_overlap.pyx because it depends on /home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd.
[1/1] Cythonizing utils/compute_overlap.pyx
/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/mona/effpose/EfficientPose/utils/compute_overlap.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
In file included from /home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832,
                 from /home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from utils/compute_overlap.c:630:
/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
utils/compute_overlap.c: In function ‘__pyx_pf_5utils_15compute_overlap_2calc_min_distance_between_all_point_pairs’:
utils/compute_overlap.c:2932:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
 2932 |   for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      |                                   ^
(effpose) mona@ada:~/effpose/EfficientPose$ python evaluate.py --phi 0 --weights weights/Weights/Linemod/object_8/phi_0_linemod_best_ADD.h5 --validation-image-save-path val_imgs linemod data/Linemod_preprocessed/ --object-id 8
2023-11-29 15:37:48.004927: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/scipy/__init__.py:143: UserWarning: A NumPy version >=1.19.5 and <1.27.0 is required for this version of SciPy (detected version 1.18.5)
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
WARNING:tensorflow:From evaluate.py:132: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From evaluate.py:134: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2023-11-29 15:37:49.014289: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3096000000 Hz
2023-11-29 15:37:49.019453: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3491e40 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-11-29 15:37:49.019491: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2023-11-29 15:37:49.022049: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2023-11-29 15:37:49.094523: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x32233b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2023-11-29 15:37:49.094614: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): NVIDIA RTX 6000 Ada Generation, Compute Capability 8.9
2023-11-29 15:37:49.095632: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1665] Found device 0 with properties: 
name: NVIDIA RTX 6000 Ada Generation major: 8 minor: 9 memoryClockRate(GHz): 2.505
pciBusID: 0000:52:00.0
2023-11-29 15:37:49.095693: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2023-11-29 15:37:49.124686: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2023-11-29 15:37:49.128511: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2023-11-29 15:37:49.128935: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2023-11-29 15:37:49.129567: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.11
2023-11-29 15:37:49.130478: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2023-11-29 15:37:49.130703: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2023-11-29 15:37:49.131092: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1793] Adding visible gpu devices: 0
2023-11-29 15:37:49.131121: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2023-11-29 15:37:49.136366: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1206] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-11-29 15:37:49.136404: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212]      0 
2023-11-29 15:37:49.136410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1225] 0:   N 
2023-11-29 15:37:49.136896: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1351] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 39195 MB memory) -> physical GPU (device: 0, name: NVIDIA RTX 6000 Ada Generation, pci bus id: 0000:52:00.0, compute capability: 8.9)
{'dataset_type': 'linemod', 'rotation_representation': 'axis_angle', 'weights': 'weights/Weights/Linemod/object_8/phi_0_linemod_best_ADD.h5', 'batch_size': 1, 'phi': 0, 'gpu': None, 'score_threshold': 0.5, 'validation_image_save_path': 'val_imgs', 'linemod_path': 'data/Linemod_preprocessed/', 'object_id': 8}

Creating the Generators...
Traceback (most recent call last):
  File "evaluate.py", line 368, in <module>
    main()
  File "evaluate.py", line 99, in main
    generator = create_generators(args)
  File "evaluate.py", line 153, in create_generators
    from generators.linemod import LineModGenerator
  File "/home/mona/effpose/EfficientPose/generators/linemod.py", line 34, in <module>
    from generators.common import Generator
  File "/home/mona/effpose/EfficientPose/generators/common.py", line 34, in <module>
    from generators.randaug import RandAugment
  File "/home/mona/effpose/EfficientPose/generators/randaug.py", line 23, in <module>
    from imgaug import parameters as iap
  File "/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/imgaug/__init__.py", line 7, in <module>
    from imgaug.imgaug import *  # pylint: disable=redefined-builtin
  File "/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/imgaug/imgaug.py", line 22, in <module>
    import skimage.draw
  File "/home/mona/anaconda3/envs/effpose/lib/python3.8/site-packages/skimage/__init__.py", line 122, in <module>
    from ._shared import geometry
  File "geometry.pyx", line 1, in init skimage._shared.geometry
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

I have

(effpose) mona@ada:~/effpose/EfficientPose$ cat environment.yml 
name: effpose
channels:
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2023.08.22=h06a4308_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libffi=3.4.4=h6a678d5_0
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.12=h7f8727e_0
  - pip=23.3.1=py38h06a4308_0
  - python=3.8.18=h955ad1f_0
  - readline=8.2=h5eee18b_0
  - setuptools=68.0.0=py38h06a4308_0
  - sqlite=3.41.2=h5eee18b_0
  - tk=8.6.12=h1ccaba5_0
  - wheel=0.41.2=py38h06a4308_0
  - xz=5.4.2=h5eee18b_0
  - zlib=1.2.13=h5eee18b_0
  - pip:
      - absl-py==2.0.0
      - astor==0.8.1
      - contourpy==1.1.1
      - cycler==0.12.1
      - cython==0.29.23
      - fonttools==4.45.1
      - gast==0.2.2
      - google-pasta==0.2.0
      - grpcio==1.59.3
      - h5py==3.10.0
      - imageio==2.33.0
      - imgaug==0.4.0
      - importlib-metadata==6.8.0
      - importlib-resources==6.1.1
      - keras-applications==1.0.8
      - keras-preprocessing==1.1.2
      - kiwisolver==1.4.5
      - lazy-loader==0.3
      - markdown==3.5.1
      - markupsafe==2.1.3
      - matplotlib==3.7.4
      - networkx==3.1
      - numpy==1.18.5
      - nvidia-cublas==11.3.0.106
      - nvidia-cuda-cupti==11.1.105
      - nvidia-cuda-nvcc==11.1.105
      - nvidia-cuda-nvrtc==11.1.105
      - nvidia-cuda-runtime==11.1.74
      - nvidia-cudnn==8.0.5.43
      - nvidia-cufft==10.3.0.105
      - nvidia-curand==10.2.2.105
      - nvidia-cusolver==11.0.1.105
      - nvidia-cusparse==11.3.0.10
      - nvidia-dali-cuda110==0.28.0
      - nvidia-dali-nvtf-plugin==0.28.0+nv20.12
      - nvidia-nccl==2.8.3
      - nvidia-pyindex==1.0.9
      - nvidia-tensorboard==1.15.0+nv20.12
      - nvidia-tensorflow==1.15.4+nv20.12
      - nvidia-tensorrt==7.2.2.1
      - opencv-python==4.3.0.36
      - opt-einsum==3.3.0
      - packaging==23.2
      - pillow==10.1.0
      - plyfile==1.0.2
      - progressbar2==4.2.0
      - protobuf==4.25.1
      - pyparsing==3.1.1
      - python-dateutil==2.8.2
      - python-utils==3.8.1
      - pywavelets==1.4.1
      - pyyaml==6.0.1
      - scikit-image==0.21.0
      - scipy==1.10.1
      - shapely==2.0.2
      - six==1.16.0
      - tensorboard==1.15.0
      - tensorflow-estimator==1.15.1
      - termcolor==2.3.0
      - tifffile==2023.7.10
      - tqdm==4.66.1
      - typeguard==4.1.5
      - typing-extensions==4.8.0
      - webencodings==0.5.1
      - werkzeug==3.0.1
      - wrapt==1.16.0
      - zipp==3.17.0
prefix: /home/mona/anaconda3/envs/effpose