Skip to content
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

classification model #16

Open
fw-codes-files opened this issue Feb 15, 2023 · 1 comment
Open

classification model #16

fw-codes-files opened this issue Feb 15, 2023 · 1 comment

Comments

@fw-codes-files
Copy link

hi, thanks to your great work. I check issues before, that I saw your comment on #11 .The codes about
base = [
'../base/datasets/modelnet40.py',
'../base/schedulers/multi-step_sgd.py',
'../base/tests/classification.py',
'../base/default_runtime.py'
]
I don't find the references in the project. Could you plz release these py files?
thanks a lot!

@Gofinge
Copy link
Member

Gofinge commented Feb 15, 2023

Do you mean issue #9 ? The example config in issue #9 was a config from an older version of our codebase and these are base configs that experiment config based on. Following config setting only for reference:

"../base/datasets/modelnet40.py"

# dataset settings
dataset_type = "ModelNetDataset"
data_root = "data/modelnet40_normal_resampled"
cache_data = False
names = ["airplane", "bathtub", "bed", "bench", "bookshelf",
         "bottle", "bowl", "car", "chair", "cone",
         "cup", "curtain", "desk", "door", "dresser",
         "flower_pot", "glass_box", "guitar", "keyboard", "lamp",
         "laptop", "mantel", "monitor", "night_stand", "person",
         "piano", "plant", "radio", "range_hood", "sink",
         "sofa", "stairs", "stool", "table", "tent",
         "toilet", "tv_stand", "vase", "wardrobe", "xbox"]

data = dict(
    num_classes=40,
    ignore_label=-1,  # dummy ignore
    names=names,
    train=dict(
        type=dataset_type,
        split="train",
        data_root=data_root,
        class_names=names,
        transform=[
            dict(type="NormalizeCoord"),
            # dict(type="RandomDropout", dropout_ratio=0.2, dropout_application_ratio=0.2),
            # dict(type="CenterShift", apply_z=True),
            # dict(type="RandomRotate", angle=[-1, 1], axis='z', center=[0, 0, 0], p=0.5),
            # dict(type="RandomRotate", angle=[-1/24, 1/24], axis='x', p=0.5),
            # dict(type="RandomRotate", angle=[-1/24, 1/24], axis='y', p=0.5),
            dict(type="RandomScale", scale=[0.9, 1.1]),
            # dict(type="RandomFlip", p=0.5),
            # dict(type="RandomJitter", sigma=0.005, clip=0.02),
            dict(type="RandomShift", shift=[0.2, 0.2, 0.2]),
            dict(type="Voxelize", voxel_size=0.02, hash_type='fnv', mode='train'),
            # dict(type="ElasticDistortion", distortion_params=[[0.2, 0.4], [0.8, 1.6]]),

            # dict(type="Voxelize", voxel_size=0.01, hash_type='fnv', mode='train'),
            # dict(type="SphereCrop", point_max=10000, mode='random'),
            # dict(type="CenterShift", apply_z=True),
            dict(type="ShufflePoint"),
            dict(type="ToTensor"),
        ],
        loop=2,
        test_mode=False,
    ),

    val=dict(
        type=dataset_type,
        split="test",
        data_root=data_root,
        class_names=names,
        transform=[
            dict(type="NormalizeCoord"),
            dict(type="ToTensor"),
        ],
        loop=1,
        test_mode=False,
    ),

    test=dict(
        type=dataset_type,
        split="test",
        data_root=data_root,
        class_names=names,
        transform=[
            dict(type="NormalizeCoord"),
            dict(type="ToTensor"),
        ],
        loop=1,
        test_mode=True,
        test_cfg=dict(
        )
    ),
)

criteria = [
    dict(type="CrossEntropyLoss",
         loss_weight=1.0,
         ignore_index=data["ignore_label"])
]

'../base/tests/classification.py'

test = dict(
    type="ClassificationTest",
    # scales=[0.9, 0.95, 1, 1.05, 1.1],
    scales=[1],
    shuffle=True
)

'../base/schedulers/multi-step_sgd.py'

epochs = 100
start_epoch = 0
optimizer = dict(type='SGD', lr=0.5, momentum=0.9, weight_decay=0.0001, nesterov=True)
scheduler = dict(type='MultiStepLR', milestones=[epochs * 0.6, epochs * 0.8], steps_per_epoch=1, gamma=0.1)

'../base/default_runtime.py' Also exists in the current version. To bring more flexibility to research config, current and future version PCR config only based on '../base/default_runtime.py'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants