Open Jenny0420 opened 2 months ago
I have the exact same problem.
I'm using the full dataset, not mini though.
I'm sharing my python packages, I think they are all the correct version.
I've used pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html mmdet==2.14.0 "numpy<1.20.0" nuscenes-devkit shapely==1.8.5.post1 mmsegmentation==0.14.1 mmcv-full==1.4.0 timm "networkx<2.3,>=2.2" --force-reinstall
command to make sure everything has the correct version.
Also removed av2 from the requirements.txt file since I will not use argoverse dataset.
But still, I get the same error:
(maptr) mfc@mfc-leo:~/projects/MapTR$ python tools/maptrv2/custom_nusc_map_converter.py --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0 --canbus ./data
v1.0-trainval ./data/nuscenes
======
Loading NuScenes tables for version v1.0-trainval...
23 category,
8 attribute,
4 visibility,
64386 instance,
12 sensor,
10200 calibrated_sensor,
2631083 ego_pose,
68 log,
850 scene,
34149 sample,
2631083 sample_data,
1166187 sample_annotation,
4 map,
Done loading in 26.446 seconds.
======
Reverse indexing ...
Done reverse indexing in 5.7 seconds.
======
total scene num: 850
exist scene num: 850
train scene: 700, val scene: 150
[ ] 0/34149, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/maptrv2/custom_nusc_map_converter.py", line 928, in <module>
nuscenes_data_prep(
File "tools/maptrv2/custom_nusc_map_converter.py", line 869, in nuscenes_data_prep
create_nuscenes_infos(
File "tools/maptrv2/custom_nusc_map_converter.py", line 825, in create_nuscenes_infos
train_nusc_infos, val_nusc_infos = _fill_trainval_infos(
File "tools/maptrv2/custom_nusc_map_converter.py", line 340, in _fill_trainval_infos
info = obtain_vectormap(nusc_maps, map_explorer, info, point_cloud_range)
File "tools/maptrv2/custom_nusc_map_converter.py", line 371, in obtain_vectormap
map_anns = vector_map.gen_vectorized_samples(lidar2global_translation, lidar2global_rotation)
File "tools/maptrv2/custom_nusc_map_converter.py", line 442, in gen_vectorized_samples
centerline_list = self.centerline_geoms_to_instances(centerline_geom)
File "tools/maptrv2/custom_nusc_map_converter.py", line 672, in centerline_geoms_to_instances
centerline_geoms_list,pts_G = self.union_centerline(geoms_dict)
File "tools/maptrv2/custom_nusc_map_converter.py", line 743, in union_centerline
paths = nx.all_simple_paths(pts_G, root, leaves)
File "/home/mfc/miniconda3/envs/maptr/lib/python3.8/site-packages/networkx/algorithms/simple_paths.py", line 202, in all_simple_paths
raise nx.NodeNotFound('target node %s not in graph' % target)
networkx.exception.NodeNotFound: target node [(15.0, 2.355), (15.0, -2.636), (4.167, -30.0), (-15.0, 15.813), (0.284, -30.0)] not in graph
(maptr) mfc@mfc-leo:~/projects/MapTR$
@LegendBC could you help please?
@xmfcx
The above error is caused by a mismatch version of networkx
. I solve this error when I change version to networkx==3.1
. You can try it
@xmfcx
I don't think we need to fully meet the version requirements of mmdet3d 0.17.2
, otherwise it will cause conflicts with other packages version.
Here are the version information in my environment, especially the following packages to pay attention to:
numba==0.48.0
numpy==1.23.5
Package Version Location
------------------------ ------------ ------------------------------
absl-py 2.0.0
addict 2.4.0
albumentations 0.4.6
appdirs 1.4.4
audioread 3.0.0
brotlipy 0.7.0
cachetools 5.3.1
certifi 2022.12.7
cffi 1.15.0
charset-normalizer 2.0.4
colorama 0.4.4
conda-content-trust 0+unknown
conda-package-handling 1.8.1
contourpy 1.1.1
cryptography 36.0.0
cycler 0.12.1
decorator 5.1.1
descartes 1.1.0
dill 0.3.7
filelock 3.16.1
fire 0.6.0
fonttools 4.43.1
fsspec 2024.9.0
future 0.18.3
GeometricKernelAttention 1.0
get-f0 0.2.3
google-auth 2.23.3
google-auth-oauthlib 1.0.0
grpcio 1.59.0
huggingface-hub 0.25.0
idna 3.3
imageio 2.31.5
imgaug 0.4.0
importlib-metadata 6.8.0
importlib-resources 6.1.0
joblib 1.2.0
kiwisolver 1.4.5
lazy_loader 0.3
librosa 0.9.2
llvmlite 0.31.0
lyft-dataset-sdk 0.0.8
Markdown 3.5
MarkupSafe 2.1.3
matplotlib 3.5.3
mmcv-full 1.4.0
mmdet 2.14.0
mmdet3d 0.17.2 /workspace/MapTRv2/mmdetection3d
mmsegmentation 0.14.1
multiprocess 0.70.15
networkx 3.1
numba 0.48.0
numpy 1.23.5
nuscenes-devkit 1.1.11
oauthlib 3.2.2
opencv-python 4.8.1.78
opencv-python-headless 4.8.1.78
p-tqdm 1.4.0
packaging 23.0
pandas 2.0.3
pathos 0.3.1
Pillow 10.0.1
pip 21.2.4
platformdirs 3.11.0
pluggy 1.0.0
plyfile 1.1
pooch 1.6.0
pox 0.3.3
ppft 1.7.6.7
prettytable 3.11.0
protobuf 4.24.4
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycocotools 2.0.7
pycosat 0.6.3
pycparser 2.21
pyOpenSSL 22.0.0
pyparsing 3.1.1
pyquaternion 0.9.9
PySocks 1.7.1
python-dateutil 2.8.2
pytz 2024.2
PyWavelets 1.4.1
PyYAML 6.0.1
qudida 0.0.4
requests 2.27.1
requests-oauthlib 1.3.1
resampy 0.4.2
rsa 4.9
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
ruamel-yaml-conda 0.15.100
safetensors 0.4.5
scikit-image 0.21.0
scikit-learn 1.2.1
scipy 1.10.0
setuptools 65.5.1
Shapely 1.8.5
six 1.16.0
soundfile 0.11.0
tensorboard 2.14.0
tensorboard-data-server 0.7.1
termcolor 2.4.0
terminaltables 3.1.10
threadpoolctl 3.1.0
tifffile 2023.7.10
timm 1.0.9
tomli 2.0.1
toolz 0.12.0
torch 1.9.0+cu111
torchaudio 0.9.0
torchvision 0.10.0+cu111
tqdm 4.63.0
trimesh 2.35.39
typing_extensions 4.8.0
tzdata 2024.1
urllib3 1.26.8
wcwidth 0.2.13
Werkzeug 3.0.0
wheel 0.38.1
yapf 0.40.1
zipp 3.11.0
Thanks @cyn-liu !
After running my previous:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html mmdet==2.14.0 "numpy<1.20.0" nuscenes-devkit shapely==1.8.5.post1 mmsegmentation==0.14.1 mmcv-full==1.4.0 timm "networkx<2.3,>=2.2"
I ran:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html mmdet==2.14.0 nuscenes-devkit shapely==1.8.5.post1 mmsegmentation==0.14.1 mmcv-full==1.4.0 timm numpy==1.23.5 networkx==3.1 numba==0.48.0
To comply with the versions you've shared.
I've got these errors but I ignored them like you've said.
I ran numpy==1.23.5 networkx==3.1 numba==0.48.0
separately to make sure they are installed.
Then https://github.com/hustvl/MapTR/blob/e03f097abef19e1ba3fed5f471a8d80fbfa0a064/docs/prepare_dataset.md?plain=1#L18 ran correctly.
I wonder what does the prediction look like on v1.0 mini? I followed above setup and able to run everything. But the result is random prediction, lol. like the following.
I wonder what does the prediction look like on v1.0 mini? I followed above setup and able to run everything. But the result is random prediction, lol. like the following.
Hi, I have similar results on Maptr2, do you solve it already? Mandy thanks
I had downloaded the entire dataset. For me, the predictions looked as they should. I didn't see outputs like yours. I did not test on mini though.
Thanks for your suggestions and I will try again!
Thanks for your suggestions and I will try again!
I used the nuscenes-mini dataset for MapTR v1 prediction visualization, and my results looks normal. I think you should pay attention to the following two aspects.
I use the following command to generate custom annotation files:
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0-mini --canbus ./data/nuscenes
I use the following command to visualize prediction:
cd /path/to/MapTR/
export PYTHONPATH="/path/to/MapTR/"
python tools/maptr/vis_pred.py projects/configs/maptr/maptr_tiny_r50_24e_t4.py ckpt/maptr_tiny_r50_24e.pth
All the visualization samples of mine will be saved in /path/to/MapTR/work_dirs/maptr_tiny_r50_24e_t4/vis_pred/
.
Thanks for your suggestions and I will try again!
I used the nuscenes-mini dataset for MapTR v1 prediction visualization, and my results looks normal. I think you should pay attention to the following two aspects.
- Check your running environment
- Check custom annotation files your have generated
I use the following command to generate custom annotation files:
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0-mini --canbus ./data/nuscenes
I use the following command to visualize prediction:
cd /path/to/MapTR/ export PYTHONPATH="/path/to/MapTR/" python tools/maptr/vis_pred.py projects/configs/maptr/maptr_tiny_r50_24e_t4.py ckpt/maptr_tiny_r50_24e.pth
All the visualization samples of mine will be saved in
/path/to/MapTR/work_dirs/maptr_tiny_r50_24e_t4/vis_pred/
.
Thank you for your reply. I am using the maptv2, so might be I might also try v1 first.
Thank you for your reply. I am using the maptv2, so might be I might also try v1 first.
I used the nuscenes-mini dataset for MapTR v2 prediction visualization, and my results looks also normal!
Notes: annotation generation of MapTRv2 is different from MapTR
I wonder what does the prediction look like on v1.0 mini? I followed above setup and able to run everything. But the result is random prediction, lol. like the following.
Hi, I have similar results on Maptr2, do you solve it already? Mandy thanks
Sorry for the late reply! In my case, I loaded the wrong checkpoint weights. I previously mistakenly loaded only the resenet weight, but in fact you should directly load the actual model weight (even though both seems to be able to load with no error)
many thanks, both! I will evaluate again step by steps
File "/home/jonas/PyProject/MapTR/tools/maptrv2/custom_nusc_map_converter.py", line 731, in union_centerline paths = nx.all_simple_paths(pts_G, root, leaves) File "/home/jonas/PyProject/MapTR/venv/lib/python3.10/site-packages/networkx/algorithms/simple_paths.py", line 202, in all_simple_paths raise nx.NodeNotFound('target node %s not in graph' % target) networkx.exception.NodeNotFound: target node [(-1.514, 30.0), (2.908, 30.0), (8.48, -30.0), (11.714, -30.0), (6.259, 30.0)] not in graph
How can i do?