tyagi-iiitv / PointPillars

GNU General Public License v3.0
105 stars 47 forks source link

in point_pillars_test.py, what is from point_pillars import select ?? #37

Open CDahmsSpireon opened 3 years ago

CDahmsSpireon commented 3 years ago

Referring to:

https://github.com/tyagi-iiitv/PointPillars/blob/master/point_pillars_test.py#L5

from point_pillars import createPillars, createPillarsTarget, select

If I go to:

https://github.com/tyagi-iiitv/PointPillars/blob/master/src/point_pillars.cpp

I can clearly see where createPillars and createPillarsTarget are defined, but I don't see where select is defined? Not surprisingly, when running point_pillars_test.py I'm getting an error indicating select does not exist:

$ python3 point_pillars_test.py
2021-05-31 08:42:43.933816: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "point_pillars_test.py", line 5, in <module>
    from point_pillars import createPillars, createPillarsTarget, select
ImportError: cannot import name 'select' from 'point_pillars' (/usr/local/lib/python3.8/dist-packages/point_pillars-0.0.1-py3.8-linux-x86_64.egg/point_pillars.cpython-38-x86_64-linux-gnu.so)

Has anybody gotten point_pillars_test.py to run without error? I gather I should modify https://github.com/tyagi-iiitv/PointPillars/blob/master/point_pillars_test.py#L65 to remove select but I'm not sure how. Additionally I find the name select inherently confusing due to being the same as the inbuilt Python select library.

tuan97anton commented 2 years ago

I get the same error above. I run on Dockfile :

FROM tensorflow/tensorflow:2.6.1-gpu
RUN pip install cmake sklearn opencv-python tensorflow_probability

Does everyone have ressolve it? Thank!

LoJunKai commented 2 years ago

Not too sure if the following is what the author means, but here is what I did:

  1. In https://github.com/tyagi-iiitv/PointPillars/blob/master/point_pillars_test.py#L5, remove select from the import -> from point_pillars import createPillars, createPillarsTarget.
  2. Instead import the function from processors.py as from processors import select_best_anchors
  3. In https://github.com/tyagi-iiitv/PointPillars/blob/master/point_pillars_test.py#L65, call the new function instead -> target = select_best_anchors(target).

Basically:

# from point_pillars import createPillars, createPillarsTarget, select
from point_pillars import createPillars, createPillarsTarget
from processors import select_best_anchors

...

#         target = select(target, selected)
        target = select_best_anchors(target)