Closed sidiangongyuan closed 4 months ago
Hi, please follow the code in AutoAlignV2 exactly for generting the train/val infos.
Here is my data structure, is there any problem?
I just run python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes
The extra content is generated by other tasks and should not affect .
Hi, thanks for your interest. If you've re-generated the infos from AutoAlignV2, 'gt_boxes_2d' should have been contained in the infos, according to _https://github.com/yinjunbo/IS-Fusion/blob/ef65e0a0e21eba9a86e1ca209492e35bbfbe7966/tools/data_converter/nuscenes_converter.py#L350_
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes will not generate train and val .pkl , it just generate test.pkl.
and do I need to uncomment this?
Hi, you can uncomment this https://github.com/yinjunbo/IS-Fusion/blob/b79667a4ca5e857fe3909864d87606c22c3804a7/tools/create_data.py#L230 to geenrate train&val infos.
Yes I found that.
And do I need to uncomment codes I show before ?
No need. But please remember to back up your previous infos to avoid it being overwritten by the new ones.
OK, thank you for your help .
No need. But please remember to back up your previous infos to avoid it being overwritten by the new ones.
Sorry, I encountered a problem again, when I generated the pkl of train and val,
FileNotFoundError: NuScenesDataset: [Errno 2] No such file or directory: './data/nuscenes/nuscenes_infos_trainval.pkl'
def nuscenes_data_prep(root_path, info_prefix, version, dataset_name, out_dir, max_sweeps=10): """Prepare data related to nuScenes dataset.
Related data consists of '.pkl' files recording basic infos,
2D annotations and groundtruth database.
Args:
root_path (str): Path of dataset root.
info_prefix (str): The prefix of info filenames.
version (str): Dataset version.
dataset_name (str): The dataset class name.
out_dir (str): Output directory of the groundtruth database info.
max_sweeps (int): Number of input consecutive frames. Default: 10
"""
nuscenes_converter.create_nuscenes_infos(
root_path, info_prefix, version=version, max_sweeps=max_sweeps)
if version == 'v1.0-test':
info_test_path = osp.join(root_path, f'{info_prefix}_infos_test.pkl')
nuscenes_converter.export_2d_annotation(
root_path, info_test_path, version=version)
return
info_train_path = osp.join(root_path, f'{info_prefix}_infos_train.pkl')
info_val_path = osp.join(root_path, f'{info_prefix}_infos_val.pkl')
# nuscenes_converter.export_2d_annotation(
# root_path, info_train_path, version=version)
# nuscenes_converter.export_2d_annotation(
# root_path, info_val_path, version=version)
create_groundtruth_database(dataset_name, root_path, info_prefix,
f'{out_dir}/{info_prefix}_infos_trainval.pkl',
with_bbox=True)
I need to confirm again, is the initial structure of the file like mine?
Yes, the original files are like what you've showed. You can use the updated code to avoid the problem: https://github.com/yinjunbo/IS-Fusion/blob/167dc78de50da583a87597d57791f3dcbca91e9b/tools/create_data.py#L83C33-L83C76
Thank you for your patient answer, I have solved the problem
Thank you for your patient answer, I have solved the problem 请问现在是直接使用作者这个命令就可以了吗,还需要去[AutoAlignV2]生成吗?
Thank you for your patient answer, I have solved the problem 请问现在是直接使用作者这个命令就可以了吗,还需要去[AutoAlignV2]生成吗?
是的
谢谢!
侯业飞 @.*** |
---|
---- Replied Message ---- | From | @.> | | Date | 7/24/2024 10:02 | | To | @.> | | Cc | @.>, @.> | | Subject | Re: [yinjunbo/IS-Fusion] gt_bboxes_2d = info['gt_boxes_2d'][mask] (Issue #11) |
Thank you for your patient answer, I have solved the problem 请问现在是直接使用作者这个命令就可以了吗,还需要去[AutoAlignV2]生成吗?
是的
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Hello, I encountered the same error when using the nuscenes mini dataset. I tried the above method but it didn't work. How can I fix it?
Hello, I encountered the same error when using the nuscenes mini dataset. I tried the above method but it didn't work. How can I fix it?
我这里并没有使用 mini。使用的是完整的数据集。 在生成数据的时候, train_version = f'{args.version}-trainval' 有mini的选项吧?
In nuscenes_dataset.py
NOTE load image annotations
KeyError: 'gt_boxes_2d'.
what's wrong ?