traveller59 / second.pytorch

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

Message type "second.protos.VoxelNet" has no field named "network_class_name" #240

Open andrearama opened 5 years ago

andrearama commented 5 years ago

Hi everyone and thanks for this amazing work.

I have some problems setting up everything. Following the instructions, when I put : python create_data.py kitti_data_prep --data_path=../KITTI I get as output:

`nvcc -std=c++11 -c -o ../cc/nms/nms_kernel.cu.o ../cc/nms/nms_kernel.cu.cc -I/usr/local/cuda/include -x cu -Xcompiler -fPIC -arch=sm_52 --expt-relaxed-constexpr g++ -std=c++11 -shared -o /scratch/fs1/ramazza/ramazza/second.pytorch/second/core/non_max_suppression/nms.so ../cc/nms/nms_kernel.cu.o ../cc/nms/nms.cc -I/scratch/fs1/ramazza/ramazza/second.pytorch/second/boost_1_70_0 -I/usr/local/cuda/include -fPIC -O3 -I/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/include/python3.6m -I/lhome/ramazza/.local/include/python3.6m -L/usr/local/cuda/lib64 -lcublas -lcudart g++ -std=c++11 -shared -o /scratch/fs1/ramazza/ramazza/second.pytorch/second/core/box_ops_cc.so ./cc/box_ops.cc -I/scratch/fs1/ramazza/ramazza/second.pytorch/second/boost_1_70_0 -fPIC -O3 -I/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/include/python3.6m -I/lhome/ramazza/.local/include/python3.6m Fire trace:

  1. Initial component
  2. ('Cannot find target in dict:', 'kitti_data_prep', {'name': 'main', 'doc': None, 'package': None, 'loader': <_frozen_importlib_external.SourceFileLoader object at 0x7f04dbea7cf8>, 'spec': None, 'annotations': {}, 'builtins': <module 'builtins' (built-in)>, 'file': 'create_data.py', 'cached': None, 'copy': <module 'copy' from '/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/lib/python3.6/copy.py'>, 'pathlib': <module 'pathlib' from '/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/lib/python3.6/pathlib.py'>, 'pickle': <module 'pickle' from '/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/lib/python3.6/pickle.py'>, 'fire': <module 'fire' from '/lhome/ramazza/.local/lib/python3.6/site-packages/fire/init.py'>, 'np': <module 'numpy' from '/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/lib/python3.6/site-packages/numpy/init.py'>, 'imgio': <module 'skimage.io' from '/scratch/fs1/ramazza/ramazza/anaconda2/envs/second/lib/python3.6/site-packages/skimage/io/init.py'>, 'box_np_ops': <module 'second.core.box_np_ops' from '/scratch/fs1/ramazza/ramazza/second.pytorch/second/core/box_np_ops.py'>, 'bound_points_jit': CPUDispatcher(<function bound_points_jit at 0x7f04c027abf8>), 'kitti': <module 'second.data.kitti_common' from '/scratch/fs1/ramazza/ramazza/second.pytorch/second/data/kitti_common.py'>, 'prog_bar': <function progress_bar_iter at 0x7f04c16af840>, '_read_imageset_file': <function _read_imageset_file at 0x7f04dbed6ea0>, '_calculate_num_points_in_gt': <function _calculate_num_points_in_gt at 0x7f04c16afae8>, 'create_kitti_info_file': <function create_kitti_info_file at 0x7f04c16afd08>, '_create_reduced_point_cloud': <function _create_reduced_point_cloud at 0x7f04c16afd90>, 'create_reduced_point_cloud': <function create_reduced_point_cloud at 0x7f04c16afe18>, 'create_groundtruth_database': <function create_groundtruth_database at 0x7f04c16afea0>})

Type: dict String form: {'name': 'main', 'doc': None, 'package': None, 'loader': <_frozen_importlib_e <...> 6afe18>, 'create_groundtruth_database': <function create_groundtruth_database at 0x7f04c16afea0>} Length: 25

Usage: create_data.py create_data.py copy create_data.py pathlib create_data.py pickle create_data.py fire create_data.py np create_data.py imgio create_data.py box-np-ops create_data.py bound-points-jit create_data.py kitti create_data.py prog-bar create_data.py create-kitti-info-file create_data.py create-reduced-point-cloud create_data.py create-groundtruth-database `

Hoping that it is not a problem, I continue in the process and hence try the training: python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir= pytorch/models/pointpillars I got the error "import sparseconvnet as scn No module named 'sparseconvnet'" but I think it is due to the previous name so changing it to "import spconv as scn " and this problem does not arise anymore. However, now I get the error: Traceback (most recent call last): File "./pytorch/train.py", line 659, in <module> fire.Fire() File "/lhome/ramazza/.local/lib/python3.6/site-packages/fire/core.py", line 127, in Fire component_trace = _Fire(component, args, context, name) File "/lhome/ramazza/.local/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire component, remaining_args) File "/lhome/ramazza/.local/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable result = fn(*varargs, **kwargs) File "./pytorch/train.py", line 109, in train text_format.Merge(proto_str, config) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 685, in Merge allow_unknown_field=allow_unknown_field) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 752, in MergeLines return parser.MergeLines(lines, message) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 777, in MergeLines self._ParseOrMerge(lines, message) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 799, in _ParseOrMerge self._MergeField(tokenizer, message) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 924, in _MergeField merger(tokenizer, message, field) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 998, in _MergeMessageField self._MergeField(tokenizer, sub_message) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 924, in _MergeField merger(tokenizer, message, field) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 998, in _MergeMessageField self._MergeField(tokenizer, sub_message) File "/lhome/ramazza/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 891, in _MergeField (message_descriptor.full_name, name)) google.protobuf.text_format.ParseError: 3:5 : Message type "second.protos.VoxelNet" has no field named "network_class_name".

Looking here and in spconv repo no-one else encountered this problem. What am I doing wrong?

Thanks for your time and availability

IanKirwan commented 5 years ago

@andrearama your create_data.py issue will probably be solved by changing the --data_path flag to --root_path. That worked for me. I'm still trying to solve the network_class_name issue for myself.

andrearama commented 5 years ago

Thanks for the reply! Actually, I ended up using the PointPillars version given by Nutonomy here, which did not give me problems and it was enough for what I had to do!

IanKirwan commented 5 years ago

@andrearama Glad you got something working. In case you are interested: I found that the network_class_name issue was because I needed to add the second.pytorch path to the PYTHONPATH environment variable. I suspect that was your issue too.