Error when running show_seg.py
xsf777 opened this issue · 4 comments
OSError: no file with expected extension
File "F:/Users/lenovo/PycharmProjects/pythonProject6/pointnet.pytorch-master/utils/show_seg.py", line 2, in
from show3d_balls import showpoints
File "F:\Users\lenovo\PycharmProjects\pythonProject6\pointnet.pytorch-master\utils\show3d_balls.py", line 22, in
dll = np.ctypeslib.load_library('render_balls_so', '.')
File "F:\anaconda\envs\pytorch3\lib\site-packages\numpy\ctypeslib.py", line 155, in load_library
raise OSError("no file with expected extension")
I refer to this link and put the following code:
pointnet.pytorch/utils/show3d_balls.py
Lines 1 to 22 in f0c2430
change it to this:
import numpy as np
import ctypes as ct
import cv2
import sys
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
showsz=800
mousex,mousey=0.5,0.5
zoom=1.0
changed=True
def onmouse(*args):
global mousex,mousey,changed
y=args[1]
x=args[2]
mousex=x/float(showsz)
mousey=y/float(showsz)
changed=True
cv2.namedWindow('show3d')
cv2.moveWindow('show3d',0,0)
cv2.setMouseCallback('show3d',onmouse)
dll=np.ctypeslib.load_library(os.path.join(BASE_DIR, 'render_balls_so'),'.')
It's ready to go.
I hope that will help you. :)
Thanks,this help me a lot
@HeBangYan
Hello I tried your solution but nothing changed in my case. Do you have any suggestions? I am still receiving the same error.
