second.pytorch icon indicating copy to clipboard operation
second.pytorch copied to clipboard

non_max_supression

Open ghost opened this issue 5 years ago • 11 comments

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)

ghost avatar May 31 '20 19:05 ghost

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

siddancha avatar May 31 '20 19:05 siddancha

@siddancha

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

ghost avatar May 31 '20 20:05 ghost

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

siddancha avatar May 31 '20 21:05 siddancha

please help me one more time thank you in advance

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

ghost avatar May 31 '20 21:05 ghost

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

Hetali-Vekariya avatar May 19 '22 10:05 Hetali-Vekariya

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

unfortunately not

RRaphaell avatar May 19 '22 10:05 RRaphaell

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 avatar May 19 '22 11:05 siddancha

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

siddancha avatar May 19 '22 12:05 siddancha

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

Hetali-Vekariya avatar May 22 '22 12:05 Hetali-Vekariya

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

siddancha avatar May 22 '22 14:05 siddancha

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

Hetali-Vekariya avatar Jun 20 '22 09:06 Hetali-Vekariya