leonard-plotkin / pydriver Goto Github PK
View Code? Open in Web Editor NEWPython framework for training and evaluating object detectors and classifiers in road traffic environment
License: MIT License
Python framework for training and evaluating object detectors and classifiers in road traffic environment
License: MIT License
I followed the installation steps, yet I encounter this error.
` This does not appear to be a Git repository, leaving version.py unchanged.
running egg_info
creating pip-egg-info/pydriver.egg-info
writing requirements to pip-egg-info/pydriver.egg-info/requires.txt
writing pip-egg-info/pydriver.egg-info/PKG-INFO
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as cnp
import numpy as np
import sklearn.cluster
from ..common.structs cimport FLOAT_t, Position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:17:0: 'common.structs.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as cnp
import numpy as np
import sklearn.cluster
from ..common.structs cimport FLOAT_t, Position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:17:0: 'FLOAT_t.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as cnp
import numpy as np
import sklearn.cluster
from ..common.structs cimport FLOAT_t, Position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:17:30: Name 'FLOAT_t' not declared in module 'common.structs'
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as cnp
import numpy as np
import sklearn.cluster
from ..common.structs cimport FLOAT_t, Position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:17:0: 'Position.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cimport numpy as cnp
import numpy as np
import sklearn.cluster
from ..common.structs cimport FLOAT_t, Position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:17:39: Name 'Position' not declared in module 'common.structs'
Error compiling Cython file:
------------------------------------------------------------
...
# --- internal functions ---
@cython.boundscheck(False)
@cython.wraparound(False)
cpdef _adjustDetections(Position keypoint, Position[:] detectionsPos):
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:283:24: 'Position' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
# --- internal functions ---
@cython.boundscheck(False)
@cython.wraparound(False)
cpdef _adjustDetections(Position keypoint, Position[:] detectionsPos):
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:283:43: 'Position' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
# precompute sin and cos for faster rotation
rsin = libc.math.sin(keypoint.rotation_y)
rcos = libc.math.cos(keypoint.rotation_y)
for i in range(<size_t>detectionsPos.shape[0]):
# account for keypoint rotation
rotate2DXZSinCos(&detectionsPos[i].x, &detectionsPos[i].z, rsin, rcos) # rotate relative detection position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:293:25: Cannot take address of Python variable
Error compiling Cython file:
------------------------------------------------------------
...
# precompute sin and cos for faster rotation
rsin = libc.math.sin(keypoint.rotation_y)
rcos = libc.math.cos(keypoint.rotation_y)
for i in range(<size_t>detectionsPos.shape[0]):
# account for keypoint rotation
rotate2DXZSinCos(&detectionsPos[i].x, &detectionsPos[i].z, rsin, rcos) # rotate relative detection position
^
------------------------------------------------------------
pydriver/detectors/detectors.pyx:293:46: Cannot take address of Python variable
missing cimport in module '.': pydriver/pcl/pcl.pyx`
Seems to be an issue with installing the PCL library.
I installed the PCL library using the command sudo apt-get install libpcl-dev
.
In the setup.py
file I updated SKIP_PCL_HELPER
to False
.
I then tried to install via python setup.py install
. This was the output:
python setup.py develop
WARNING: Uncommitted changes detected.
Set version to: 1.0.2.dev2+37f3d2b
running develop
pydriver/pcl/pcl.pyx: cannot find cimported module '.'
Compiling pydriver/common/constants.pyx because it changed.
Compiling pydriver/common/functions.pyx because it changed.
Compiling pydriver/geometry/geometry.pyx because it changed.
Compiling pydriver/stereo/stereo.pyx because it changed.
Compiling pydriver/pcl/pcl.pyx because it changed.
Compiling pydriver/preprocessing/preprocessing.pyx because it changed.
Compiling pydriver/keypoints/base.pyx because it changed.
Compiling pydriver/keypoints/harris.pyx because it changed.
Compiling pydriver/keypoints/iss.pyx because it changed.
Compiling pydriver/features/shot.pyx because it changed.
Compiling pydriver/features/base.pyx because it changed.
Compiling pydriver/detectors/vocabularies.pyx because it changed.
Compiling pydriver/detectors/detectors.pyx because it changed.
[ 1/13] Cythonizing pydriver/common/constants.pyx
[ 2/13] Cythonizing pydriver/common/functions.pyx
[ 3/13] Cythonizing pydriver/detectors/detectors.pyx
[ 4/13] Cythonizing pydriver/detectors/vocabularies.pyx
[ 5/13] Cythonizing pydriver/features/base.pyx
[ 6/13] Cythonizing pydriver/features/shot.pyx
[ 7/13] Cythonizing pydriver/geometry/geometry.pyx
[ 8/13] Cythonizing pydriver/keypoints/base.pyx
[ 9/13] Cythonizing pydriver/keypoints/harris.pyx
[10/13] Cythonizing pydriver/keypoints/iss.pyx
[11/13] Cythonizing pydriver/pcl/pcl.pyx
[12/13] Cythonizing pydriver/preprocessing/preprocessing.pyx
[13/13] Cythonizing pydriver/stereo/stereo.pyx
running egg_info
creating pydriver.egg-info
writing top-level names to pydriver.egg-info/top_level.txt
writing pydriver.egg-info/PKG-INFO
writing requirements to pydriver.egg-info/requires.txt
writing dependency_links to pydriver.egg-info/dependency_links.txt
writing manifest file 'pydriver.egg-info/SOURCES.txt'
reading manifest file 'pydriver.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'pydriver/pcl/pcl_helper/build'
no previously-included directories found matching 'pydriver/pcl/pcl_helper/lib'
writing manifest file 'pydriver.egg-info/SOURCES.txt'
running build_ext
error: cannot copy tree '/home/matt/Downloads/pydriver/pydriver/pcl/pcl_helper/lib': not a directory
Any suggestions much appreciated.
Hey, a general query with respect to utilizing the SHOT features from PCL Helper. If suppose, you wished to extract the features for the entire point cloud, rather than for particular keypoints, passing the point cloud directly results in a feature vector that has zeros for the most part? Is there any parameter that could be altered to rectify this?
Since the keypoints extracted from a pointcloud using the PCLhelper instance (ISS or Harris) are stored as a class of that instance, would it be possible to extract them to a numpy array?
Hello, I am trying to apply the pydriver for the object detection test, after the installation, and follow the usage instruction, i meet the following problem,
`
Training on frame 0...
ValueError Traceback (most recent call last)
in ()
8 print('Training on frame %d...' % frame['frameId'])
9 # reconstruct scene
---> 10 scene = preprocessor.process(frame)
11 # get keypoints
12 keypointCloud = keypointExtractor.getKeypointCloud(scene)
/usr/local/lib/python2.7/dist-packages/pydriver-1.0.2.dev2+37f3d2b-py2.7-linux-x86_64.egg/pydriver/preprocessing/preprocessing.pyx in pydriver.preprocessing.preprocessing.Preprocessor.process (build_c/pydriver/preprocessing/preprocessing.cpp:3297)()
104 # apply cloud processors
105 for processor in self.processors:
--> 106 processor.process(scene)
107
108 # cache scene if cache is configured
/usr/local/lib/python2.7/dist-packages/pydriver-1.0.2.dev2+37f3d2b-py2.7-linux-x86_64.egg/pydriver/preprocessing/preprocessing.pyx in pydriver.preprocessing.preprocessing.GroundPlaneProcessor.process (build_c/pydriver/preprocessing/preprocessing.cpp:6850)()
348 if cloudDetection.getCloudSize()[0] < 10:
349 # invalid input, e.g. empty cloud
--> 350 raise ValueError("Ground plane could not be processed, is the cloud empty in the expected ground viewport?")
351
352 # detect ground plane
ValueError: Ground plane could not be processed, is the cloud empty in the expected ground viewport?
`
Hello,
I'm very exciting to use this project but I cannot run the example. Could you help me.
I followed the installation steps, except one step of the PCL installation, because for my version of
Ubuntu(15.04), libpcl-all library does not exist in this PPA, so I build from source instead.
[http://www.pointclouds.org/documentation/tutorials/compiling_pcl_posix.php]
All seem to be in /usr/include/pcl-1.7 and /usr/local/include/pcl-1.7.( version 1.7.2)
when I run the example ,a problem has bean encountered.
python kitti_usage.py
Traceback (most recent call last):
File "kitti_usage.py", line 12, in <module>
import pydriver
File "/usr/local/lib/python2.7/dist-packages/pydriver/__init__.py", line 52, in <module>
from . import features
File "/usr/local/lib/python2.7/dist-packages/pydriver/features/__init__.py", line 15, in <module>
from .base import FeatureExtractor # base class
File "pydriver/pcl/pcl.pxd", line 11, in init pydriver.features.base (build_c/pydriver/features/base.cpp:18142)
File "/usr/local/lib/python2.7/dist-packages/pydriver/pcl/__init__.py", line 18, in <module>
from .pcl import PCLHelper
ImportError: /usr/local/lib/python2.7/dist-packages/pydriver/pcl/pcl_helper/lib/libpcl_helper.so: undefined symbol: _ZN3pcl6search6KdTreeINS_11PointXYZRGBEEC1Eb
What can I do to solve this problem? I really need this module to work and I will appreciate if you can help me.
Thank !!
Thank you for sharing your works.
I'm looking for alpha value calculation for orientation evaluation.
In pydriver/pydriver/datasets/kitti.py, you have
if includeAlpha:
# set to object orientation
alpha = label['box3D']['rotation_y']
# adjust to X/Z observation angle of object center
alpha -= -math.atan2(label['box3D']['location']['z'], label['box3D']['location']['x']) - 1.5*math.pi
# wrap to +/-Pi
alpha = pyNormalizeAngle(alpha)
# convert to string
alpha = '%.2f' % alpha
Where does "1.5*math.pi" come from?
In kitti.py, alpha -= -math.atan2(label['box3D']['location']['z'], label['box3D']['location']['x']) - 1.5math.pi. Why plus 1.5pi? What's that meaning?
Hi,
I tried to install pydriver on pcl-1.9 but it doesn't work.
I tried to manually compile the PCL_HELPER
but I get this error message.
/usr/local/include/pcl-1.9/pcl/segmentation/euclidean_cluster_comparator.h:266:38: error: cannot bind rvalue reference of type ‘std::set<unsigned int>::value_type&&’ {aka ‘unsigned int&&’} to lvalue of type ‘uint32_t’ {aka ‘unsigned int’} exclude_labels_->insert (i);
And some other error like this ( no matching function )
Do you have an idea of what could be done ?
Or if you can specify which version of pcl would work ?
Thanks
Could it be possible to use/update python-pcl lib instead of developing your own binding ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.