-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Feature] Support FCAF3D on S3DIS dataset in dev-1.x branch
#1984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Tai-Wang
merged 22 commits into
open-mmlab:dev-1.x
from
Xiangxu-0103:support_fcaf3d-s3dis
Nov 23, 2022
Merged
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0435f2a
support fcaf3d for s3dis dataset
Xiangxu-0103 ae1a4f0
Update convert_utils.py
Xiangxu-0103 2f896e1
Update seg3d_dataset.py
Xiangxu-0103 3489c11
Delete compose.py
Xiangxu-0103 ddd6a03
fix import error
Xiangxu-0103 df5dfec
use `mmengine.Compose`
Xiangxu-0103 234f3f5
Merge branch 'dev-1.x' into support_fcaf3d-s3dis
Xiangxu-0103 5f966b9
Update s3dis-3d.py
Xiangxu-0103 045b028
Update fcaf3d_2xb8_s3dis-3d-5class.py
Xiangxu-0103 e763bd5
Update s3dis_dataset.py
Xiangxu-0103 552b07c
update unittest for s3dis
Xiangxu-0103 ab907fb
update docs
Xiangxu-0103 7fdaf9f
use `mmcv.Compose` instead of `mmengine.Compose`
Xiangxu-0103 9ce0f37
update docstring
Xiangxu-0103 715c3e5
fix s3dis preprocessing bug
Xiangxu-0103 dee13d0
Add typehint
Xiangxu-0103 2053a1d
Merge branch 'dev-1.x' into support_fcaf3d-s3dis
Xiangxu-0103 6ffd3fb
Update config and fix s3dis dataset
Xiangxu-0103 425d74b
update typehit
Xiangxu-0103 a9932ea
Update convert_utils.py
Xiangxu-0103 6d7af91
Update README and metafile
Xiangxu-0103 4ce3d3e
Merge branch 'dev-1.x' into support_fcaf3d-s3dis
Tai-Wang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # dataset settings | ||
| dataset_type = 'S3DISDataset' | ||
| data_root = 'data/s3dis/' | ||
|
|
||
| metainfo = dict(classes=('table', 'chair', 'sofa', 'bookcase', 'board')) | ||
| train_area = [1, 2, 3, 4, 6] | ||
| test_area = 5 | ||
|
|
||
| train_pipeline = [ | ||
| dict( | ||
| type='LoadPointsFromFile', | ||
| coord_type='DEPTH', | ||
| shift_height=False, | ||
| use_color=True, | ||
| load_dim=6, | ||
| use_dim=[0, 1, 2, 3, 4, 5]), | ||
| dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), | ||
| dict(type='PointSample', num_points=40000), | ||
| dict( | ||
| type='RandomFlip3D', | ||
| sync_2d=False, | ||
| flip_ratio_bev_horizontal=0.5, | ||
| flip_ratio_bev_vertical=0.5), | ||
| dict( | ||
| type='GlobalRotScaleTrans', | ||
| rot_range=[-0.087266, 0.087266], | ||
| scale_ratio_range=[1.0, 1.0]), | ||
| dict( | ||
| type='Pack3DDetInputs', | ||
| keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) | ||
| ] | ||
| test_pipeline = [ | ||
| dict( | ||
| type='LoadPointsFromFile', | ||
| coord_type='DEPTH', | ||
| shift_height=False, | ||
| use_color=True, | ||
| load_dim=6, | ||
| use_dim=[0, 1, 2, 3, 4, 5]), | ||
| dict( | ||
| type='MultiScaleFlipAug3D', | ||
| img_scale=(1333, 800), | ||
| pts_scale_ratio=1, | ||
| flip=False, | ||
| transforms=[ | ||
| dict( | ||
| type='GlobalRotScaleTrans', | ||
| rot_range=[0, 0], | ||
| scale_ratio_range=[1., 1.], | ||
| translation_std=[0, 0, 0]), | ||
| dict( | ||
| type='RandomFlip3D', | ||
| sync_2d=False, | ||
| flip_ratio_bev_horizontal=0.5, | ||
| flip_ratio_bev_vertical=0.5), | ||
| dict(type='PointSample', num_points=40000), | ||
| ]), | ||
| dict(type='Pack3DDetInputs', keys=['points']) | ||
| ] | ||
|
|
||
| train_dataloader = dict( | ||
| batch_size=8, | ||
| num_workers=4, | ||
| sampler=dict(type='DefaultSampler', shuffle=True), | ||
| dataset=dict( | ||
| type='RepeatDataset', | ||
| times=5, | ||
| dataset=dict( | ||
| type='ConcatDataset', | ||
| datasets=[ | ||
| dict( | ||
| type=dataset_type, | ||
| data_root=data_root, | ||
| ann_file=f's3dis_infos_Area_{i}.pkl', | ||
| pipeline=train_pipeline, | ||
| filter_empty_gt=False, | ||
| metainfo=metainfo, | ||
| box_type_3d='Depth') for i in train_area | ||
| ]))) | ||
|
|
||
| val_dataloader = dict( | ||
| batch_size=1, | ||
| num_workers=1, | ||
| sampler=dict(type='DefaultSampler', shuffle=False), | ||
| dataset=dict( | ||
| type=dataset_type, | ||
| data_root=data_root, | ||
| ann_file=f's3dis_infos_Area_{test_area}.pkl', | ||
| pipeline=test_pipeline, | ||
| metainfo=metainfo, | ||
| test_mode=True, | ||
| box_type_3d='Depth')) | ||
| test_dataloader = dict( | ||
| batch_size=1, | ||
| num_workers=1, | ||
| sampler=dict(type='DefaultSampler', shuffle=False), | ||
| dataset=dict( | ||
| type=dataset_type, | ||
| data_root=data_root, | ||
| ann_file=f's3dis_infos_Area{test_area}.pkl', | ||
| pipeline=test_pipeline, | ||
| metainfo=metainfo, | ||
| test_mode=True, | ||
| box_type_3d='Depth')) | ||
| val_evaluator = dict(type='IndoorMetric') | ||
| test_evaluator = val_evaluator | ||
|
|
||
| vis_backends = [dict(type='LocalVisBackend')] | ||
| visualizer = dict( | ||
| type='Det3DLocalVisualizer', vis_backends=vis_backends, name='visualizer') | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| _base_ = [ | ||
| '../_base_/models/fcaf3d.py', '../_base_/default_runtime.py', | ||
| '../_base_/datasets/s3dis-3d.py' | ||
| ] | ||
| dataset_type = 'S3DISDataset' | ||
| data_root = 'data/s3dis/' | ||
|
|
||
| metainfo = dict(classes=('table', 'chair', 'sofa', 'bookcase', 'board')) | ||
| train_area = [1, 2, 3, 4, 6] | ||
| test_area = 5 | ||
| n_points = 100000 | ||
|
|
||
| model = dict(bbox_head=dict(num_classes=5)) | ||
|
|
||
| train_pipeline = [ | ||
| dict( | ||
| type='LoadPointsFromFile', | ||
| coord_type='DEPTH', | ||
| shift_height=False, | ||
| use_color=True, | ||
| load_dim=6, | ||
| use_dim=[0, 1, 2, 3, 4, 5]), | ||
| dict(type='LoadAnnotations3D'), | ||
| dict(type='PointSample', num_points=n_points), | ||
| dict( | ||
| type='RandomFlip3D', | ||
| sync_2d=False, | ||
| flip_ratio_bev_horizontal=0.5, | ||
| flip_ratio_bev_vertical=0.5), | ||
| dict( | ||
| type='GlobalRotScaleTrans', | ||
| rot_range=[-0.087266, 0.087266], | ||
| scale_ratio_range=[0.9, 1.1], | ||
| translation_std=[.1, .1, .1], | ||
| shift_height=False), | ||
| dict(type='NormalizePointsColor', color_mean=None), | ||
| dict( | ||
| type='Pack3DDetInputs', | ||
| keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) | ||
| ] | ||
| test_pipeline = [ | ||
| dict( | ||
| type='LoadPointsFromFile', | ||
| coord_type='DEPTH', | ||
| shift_height=False, | ||
| use_color=True, | ||
| load_dim=6, | ||
| use_dim=[0, 1, 2, 3, 4, 5]), | ||
| dict( | ||
| type='MultiScaleFlipAug3D', | ||
| img_scale=(1333, 800), | ||
| pts_scale_ratio=1, | ||
| flip=False, | ||
| transforms=[ | ||
| dict( | ||
| type='GlobalRotScaleTrans', | ||
| rot_range=[0, 0], | ||
| scale_ratio_range=[1., 1.], | ||
| translation_std=[0, 0, 0]), | ||
| dict( | ||
| type='RandomFlip3D', | ||
| sync_2d=False, | ||
| flip_ratio_bev_horizontal=0.5, | ||
| flip_ratio_bev_vertical=0.5), | ||
| dict(type='PointSample', num_points=n_points) | ||
| ]), | ||
| dict(type='Pack3DDetInputs', keys=['points']) | ||
| ] | ||
|
|
||
| train_dataloader = dict( | ||
| batch_size=8, | ||
| dataset=dict( | ||
| type='RepeatDataset', | ||
| times=13, | ||
| dataset=dict( | ||
| type='ConcatDataset', | ||
| datasets=[ | ||
| dict( | ||
| type=dataset_type, | ||
| data_root=data_root, | ||
| ann_file=f's3dis_infos_Area_{i}.pkl', | ||
| pipeline=train_pipeline, | ||
| filter_empty_gt=True, | ||
| metainfo=metainfo, | ||
| box_type_3d='Depth') for i in train_area | ||
| ]))) | ||
| val_dataloader = dict( | ||
| dataset=dict( | ||
| ann_file=f's3dis_infos_Area_{test_area}.pkl', pipeline=test_pipeline)) | ||
| test_dataloader = val_dataloader | ||
|
|
||
| optim_wrapper = dict( | ||
| type='OptimWrapper', | ||
| optimizer=dict(type='AdamW', lr=0.001, weight_decay=0.0001), | ||
| clip_grad=dict(max_norm=10, norm_type=2)) | ||
|
|
||
| # learning rate | ||
| param_scheduler = dict( | ||
| type='MultiStepLR', | ||
| begin=0, | ||
| end=12, | ||
| by_epoch=True, | ||
| milestones=[8, 11], | ||
| gamma=0.1) | ||
|
|
||
| custom_hooks = [dict(type='EmptyCacheHook', after_iter=True)] | ||
|
|
||
| # training schedule for 1x | ||
| train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=12, val_interval=12) | ||
| val_cfg = dict(type='ValLoop') | ||
| test_cfg = dict(type='TestLoop') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.