traveller59 / second.pytorch

SECOND for KITTI/NuScenes object detection
MIT License
1.72k stars 722 forks source link

non_max_supression #375

Open ghost opened 4 years ago

ghost commented 4 years ago

After I deleted "second." from all the files (because of "no module named second") I get this error help me please I am on the verge of a mental breakdown :(

Traceback (most recent call last): File "create_data.py", line 11, in import data.kitti_dataset as kitti_ds File "/home/raphael/Desktop/machineVision/my_project/second.pytorch/second/data/init.py", line 1, in from . import kitti_dataset File "/home/raphael/Desktop/machineVision/my_project/second.pytorch/second/data/kitti_dataset.py", line 18, in from utils.eval import get_coco_eval_result, get_official_eval_result File "/home/raphael/Desktop/machineVision/my_project/second.pytorch/second/utils/eval.py", line 11, in from core.non_max_suppression.nms_gpu import rotate_iou_gpu_eval File "/home/raphael/Desktop/machineVision/my_project/second.pytorch/second/core/non_max_suppression/init.py", line 5, in from core.non_max_suppression.nms_cpu import nms_jit, soft_nms_jit File "/home/raphael/Desktop/machineVision/my_project/second.pytorch/second/core/non_max_suppression/nms_cpu.py", line 5, in from spconv.utils import ( ImportError: cannot import name 'non_max_suppression_cpu' from 'spconv.utils' (/home/raphael/anaconda3/lib/python3.7/site-packages/spconv/utils/init.py)

siddancha commented 4 years ago

Don't delete "second" from any files. Don't modify any files. Add the repository to your pythonpath: export PYTHONPATH=/path/to/second.pytorch

ghost commented 4 years ago

@siddancha

Screenshot from 2020-06-01 00-22-07

siddancha commented 4 years ago

You need to run this from a directory up. So cd .. first.

ghost commented 4 years ago

please help me one more time thank you in advance

Screenshot from 2020-06-01 01-37-11

Hetali-Vekariya commented 2 years ago

Hey, did you find the solution for this? I am facing the same error.

RRaphaell commented 2 years ago

Hey, did you find the solution for this? I am facing the same error.

unfortunately not

siddancha commented 2 years ago

Sorry, I meant from the second.pytorch folder, run create_data.py. To do this, you will need to use the module syntax. Can you try python -m second.create_data kitti_data_prep --data_path=KITTI_DATASET_ROOT?

siddancha commented 2 years ago

Also, make sure you're using python 3.6+.

Hetali-Vekariya commented 2 years ago

Hello,

Thank you so much for your quick reply. I really appreciate that. I tried running this command but

python -m second/create_data kitti_data_prep --data_path=KITTI_DATASET_ROOT

it is still not working. I am getting a moduleImportError. I tried to solve it for two days but no progress.

However, I wanted to ask you. Did you run this code at your end? Was it working with the above mentioned command?

and Yes I am using python 3.9.7

siddancha commented 2 years ago

@Hetali-Vekariya You did not copy the command correctly. It should be second.create_data, not second/create_data.

Hetali-Vekariya commented 2 years ago

I found the solution. You don't need to run create.py file from second.pytorch folder. You can run from second folder(In my case June/second.pytorch/second).

ModuleNotFoundError: no module named 'second'.

You need to run export PYTHONPATH=/June/second.pytorch