Pointgroup:ConfigParameters
lastmod 2026-09-14created 2026-09-142 edits
PointGroup training config file parameters: explanation and tuning guide
Overview
This page explains the parameters throughout Pointcept's PointGroup instance segmentation training config file and summarizes guidelines for modifying each parameter.
Reference files:
-
configs/scannet/insseg-pointgroup-v1m1-0-spunet-base.py(main config) -
configs/_base_/default_runtime.py(inherited default runtime config)
The config inherits the default runtime via _base_, and redefining a variable of the same name in the main config overrides it. The "Default" in the tables below is the final effective value after merging both files.
Legend
- <span style="color:blue;font-weight:bold">Safe: values you can change freely
- <span style="color:orange;font-weight:bold">Caution: linked to other values or strongly affects results
- <span style="color:red;font-weight:bold">Danger: careless changes break training or make evaluation meaningless
1. Runtime / execution control (default_runtime.py)
| Parameter | Default | Description | Tuning guide |
| | None | Path to the model weights loaded at the start of training. Used by the | Set when fine-tuning from a pretrained backbone (e.g. Sonata, PTv3). If key names differ, map them with |
| | False | Resumes interrupted training. Restores the optimizer/scheduler state as well | True when continuing from |
| | True | Runs val set evaluation at every eval interval | If evaluation takes long, set False and evaluate later with test_only. However, the best checkpoint is not saved |
| | False | Runs test only, without training | Set automatically by |
| | None | Random seed. If None, one is generated randomly and logged | Fix it for reproducible experiments. Ablation comparisons must use the same seed |
| | "exp/default" | Path where logs, checkpoints, and config backups are saved | A different path per experiment. Set automatically by |
| | 12 | Total number of DataLoader workers across all GPUs | No more than the number of CPU cores. Reduce if RAM runs out (OOM kill). 4–8 per GPU recommended |
| | 12 | Total batch size across all GPUs. Per GPU = batch_size / number of GPUs | <span style="color:orange;font-weight:bold">Caution Fit it to GPU memory. If you reduce it, reducing |
| | 1 | Accumulates gradients this many times, then updates once. Effective batch = batch_size × steps | Use when there is not enough memory to increase batch_size. BN statistics are not accumulated, so it is not a complete substitute |
| | None | Val batch. If None, 1 per GPU | Instance seg evaluates per scene, so keeping 1 is recommended |
| | None | Test batch. If None, 1 per GPU | Keep 1 |
| | 800 | Total training epochs | <span style="color:orange;font-weight:bold">Caution If the data grows from 100 to 700 samples, the same epoch count means 7x the iterations. Reset it based on total iterations. Decide by looking at the convergence curve |
| | 100 | Used to compute the evaluation/checkpoint interval. Number of data loops = epoch // eval_epoch | Adjust together when you change epoch. Lower the value to evaluate more often |
| | None | Gradient norm clipping value. Disabled if None | Set 1.0–10.0 if the loss becomes NaN or diverges |
| | False | Synchronizes BatchNorm statistics across multiple GPUs | True recommended if the per-GPU batch is small (2 or less). Slightly slower |
| | True | Uses automatic mixed precision (AMP) | Large memory/speed gains. If NaN occurs, check with False |
| | "float16" | AMP data type | On Ampere or newer GPUs, "bfloat16" is numerically more stable |
| | False | Empties the CUDA cache every iteration | Very slow. True only when OOM is intermittent |
| | False | Empties the CUDA cache every epoch | Same as above; a less costly alternative |
| | False | Allows unused parameters in DDP | True if you get an error after freezing part of the model |
| | True | Weights & Biases logging | False in offline environments |
| | "pointcept" | wandb project name | Free to change |
| | None | wandb API token. If None, the terminal login is used | Free to change |
| | 0 | Probability of CutMix-style augmentation that mixes two scenes in a batch | <span style="color:red;font-weight:bold">Danger Must be 0 for instance seg. Mixing causes instance id collisions |
| | None | Learning rate multiplier per keyword. E.g. | Used to lower the backbone lr when fine-tuning a pretrained backbone |
2. Class definitions
| Parameter | Default | Description | Tuning guide |
| | 20 ScanNet classes | List of class names. The order corresponds to the integer labels | <span style="color:red;font-weight:bold">Danger Must exactly match the label indices of your dataset. Changing the order scrambles the evaluation results |
| | 20 | Number of semantic classes | Must equal |
| | (-1, 0, 1) | Semantic labels excluded from instances. -1 is unlabeled, 0/1 are ScanNet's wall/floor | <span style="color:red;font-weight:bold">Danger Passed identically to four places: the model's clustering, |
3. Model
3.1 Top level (PG-v1m1)
| Parameter | Default | Description | Tuning guide |
| | "PG-v1m1" | Model registry name | To use a PTv3 backbone, see the "PG-v1m2" + PT-v3m1 backbone combination ( |
| | 96 | Backbone output feature dimension. Input to seg_head and bias_head | Must match the last value of the backbone |
| | num_classes | Number of semantic head outputs | Same as |
| | -1 | Label ignored by the CE loss | Match the unlabeled value of your data |
| | (-1, 0, 1) | At inference, points predicted as these semantic classes are excluded from clustering | See section 2 |
| | -1 | Instance label excluded from the offset loss | Must equal the value in |
| | 1.5 | Ball query radius. In voxel units (3cm if grid_size is 0.02). Points whose predicted centers are within this distance are candidates for the same cluster | <span style="color:orange;font-weight:bold">Caution Lower it (1.0–1.2) if small objects merge with their neighbors; raise it (2.0) if one object splits into several pieces. Changing grid_size changes the physical distance, so readjust it |
| | 300 | Maximum number of neighbors per point in the ball query | Raise it if point density is very high. Affects speed/memory |
| | 50 | In BFS clustering, clusters with fewer points than this are not created | <span style="color:orange;font-weight:bold">Caution A direct cause of missed small objects. Experiment by lowering it to 10–20. Lowering it too far increases noisy proposals |
| | 100 | Generated proposals with this many points or fewer are discarded | <span style="color:orange;font-weight:bold">Caution A direct cause of missed small objects. Lower it together with |
| | 0.02 | Divisor that converts predicted center coordinates to voxel units at inference | <span style="color:red;font-weight:bold">Danger Must equal |
Loss composition (fixed in code, not adjustable in the config)
-
loss = seg_loss + bias_l1_loss + bias_cosine_loss - seg_loss: semantic CrossEntropy (no class weights)
- bias_l1_loss: L1 of the point→instance center offset. Averaged per point, so large objects dominate
- bias_cosine_loss: cosine similarity of the offset direction
- To give small objects more weight, you must modify the loss part of
point_group_v1m1_base.pydirectly
3.2 Backbone (SpUNet-v1m1)
| Parameter | Default | Description | Tuning guide |
| | "SpUNet-v1m1" | spconv-based sparse 3D UNet | Keep as is |
| | 6 | Input feature dimension. Sum of | <span style="color:red;font-weight:bold">Danger Must be changed together whenever feat_keys changes. 3 for color only, 9 if coordinates are included |
| | 0 | Number of outputs of the backbone's own classification head. If 0, outputs features only, without a head | Keep 0 for PointGroup (the head is on the PG side) |
| | (32, 64, 128, 256, 256, 128, 96, 96) | Channels for 4 encoder stages + 4 decoder stages. First half encoder, second half decoder | Last value = |
| | (2, 3, 4, 6, 2, 2, 2, 2) | Number of residual blocks in each stage | Must have the same length as channels and an even length. Increasing it adds capacity and lowers speed |
4. Optimizer / Scheduler
| Parameter | Default | Description | Tuning guide |
| | "SGD" | Optimization algorithm | SGD is standard for SpUNet. AdamW (lr 0.002–0.006) for a PTv3 backbone |
| | 0.1 | Initial learning rate | <span style="color:orange;font-weight:bold">Caution Based on batch_size 12. Halving the batch gives 0.05. If training diverges, keep halving it |
| | 0.9 | SGD momentum | Keep as is |
| | 0.0001 | L2 regularization | Up to 0.0005 if overfitting. Generally raised the less data you have |
| | True | Nesterov momentum | Keep as is |
| | "PolyLR" || lr = lr₀ × (1 − step/total)^0.9. Decays to 0 over the total steps | Changing epoch changes total_steps automatically. Consider "OneCycleLR" if you need warmup |
5. Dataset (common)
| Parameter | Default | Description | Tuning guide |
| | "ScanNetDataset" | Dataset class | For your own data, add a class in |
| | "data/scannet" | Root of the preprocessed data. Contains train/val directories | Path to the preprocessing output |
| | num_classes | Dataset metadata | Same as section 2 |
| | -1 | Dataset metadata | Same as section 2 |
| | class_names | Used by the evaluator to print per-class AP | Same as section 2 |
| | "train" / "val" / "val" | Split directory to use | Use "test" for test if a separate split exists. The current tester does not support unlabeled test data |
| | False | If True, enables GridSample test mode (iterating over all voxels) and TTA | Instance seg does not support test_mode yet. Keep False |
6. Train transform (augmentation pipeline)
Applied in order. The order itself matters. Geometric augmentation → color augmentation → voxelization → crop → normalization → label parsing → tensor conversion.
| Transform | Parameter | Default | Description | Tuning guide |
| | apply_z | True | Moves the midpoint of the point cloud's xy (and z) min/max to the origin | Keep as is. Required as the first step |
| | dropout_ratio | 0.2 | Randomly removes 20% of the points | <span style="color:orange;font-weight:bold">Caution Small objects have few points and are vulnerable to dropout. Experiment with lowering it to 0.1 or removing it |
| dropout_application_ratio | 0.5 | Applies dropout with this probability | Adjust together with the above | |
| | angle | [-1, 1] | In units of π. Random z-axis rotation in the range [-π, π] | Keep as is for indoor scenes. Narrow the range for data with a fixed orientation (e.g. always facing front) |
| axis | "z" | Rotation axis | Keep as is | |
| center | [0, 0, 0] | Rotation center | The origin, since this runs after CenterShift | |
| p | 0.5 | Application probability | Keep as is | |
| | angle | [-1/64, 1/64] | ±2.8° tilt. Simulates sensor tilt | Can be removed if the ground is always level |
| | scale | [0.9, 1.1] | Isotropic random scaling | <span style="color:orange;font-weight:bold">Caution Widening it to [0.8, 1.2] may help strengthen small object detection. However, cluster_thresh is in voxel units, so scale changes blur the sense of physical size |
| anisotropic | False | Different scale per axis | Usually False | |
| | p | 0.5 | Flips along the x or y axis | Keep as is unless left-right asymmetry is meaningful in your data |
| | sigma | 0.005 | Standard deviation of per-point Gaussian noise (m) | Match it to the sensor noise level. 5mm is for RGB-D |
| clip | 0.02 | Maximum absolute noise value (m) | Keep as is | |
| | distortion_params | [[0.2, 0.4], [0.8, 1.6]] | Pairs of [grid size (m), distortion magnitude]. Nonlinear distortion on 20cm/80cm grids | <span style="color:orange;font-weight:bold">Caution Can destroy the shape of small objects. Remove it and compare when investigating missed detections |
| | p | 0.2 | Probability of automatic color contrast adjustment | Keep as is |
| blend_factor | None | Blend ratio with the original. Random if None | Keep as is | |
| | p | 0.95 | Probability of adding a constant offset to all colors | Keep as is |
| ratio | 0.1 | Offset range (±10% of 255) | Keep it if lighting varies a lot; lower it if color matters for your classes | |
| | p | 0.95 | Probability of per-point color noise | Keep as is |
| std | 0.05 | Noise standard deviation (relative to 255) | Keep as is | |
| | grid_size | 0.02 | Voxel size (m). Points in the same voxel are merged into one | <span style="color:red;font-weight:bold">Danger The most influential value. Reducing it to 0.01 for small objects gives 2–8x the points and a matching increase in memory. Must equal the model's |
| hash_type | "fnv" | Voxel hash function | Keep as is | |
| mode | "train" | Picks one random point per voxel | Always "train" for train | |
| return_grid_coord | True | Returns integer voxel coordinates. Required for spconv input | Always True | |
| | sample_rate | 0.8 | Keeps only the 80% of points closest to a random center | <span style="color:orange;font-weight:bold">Caution 20% is cut off, so small objects can disappear entirely. Experiment with 1.0 or removing it. If memory allows, switch to the point_max method |
| mode | "random" | How the center is chosen | random for train | |
| | (none) | Normalizes color from [0,255] → [-1,1] | Remove if colors are already normalized. If there is no color, fill it with 0 | |
| | segment_ignore_index | (-1, 0, 1) | Sets the instances of these semantic classes to -1 and computes each instance's centroid and bbox | Same value as section 2 |
| instance_ignore_index | -1 | Ignored instance value | Same as the model value | |
| | (none) | numpy → torch conversion | Keep as is | |
| | keys | coord, grid_coord, segment, instance, instance_centroid, bbox | List of keys passed to the model | Keys required by the model's forward. Keep as is |
| feat_keys | ("color", "normal") | Concatenates these keys to create | <span style="color:red;font-weight:bold">Danger If you change it, change the backbone |
7. Val / Test transform
Processed deterministically, without augmentation. Only the differences from train are listed.
| Transform | Parameter | Default | Description | Tuning guide |
| | keys_dict | coord→origin_coord, segment→origin_segment, instance→origin_instance | Preserves the original points before voxelization. The evaluator computes AP at the original resolution | Keep as is. Evaluation is impossible without it |
| | grid_size | 0.02 | Must be the same as train | <span style="color:red;font-weight:bold">Danger Always the same as train |
| | point_max | 1000000 | Enable when memory runs out | Uncomment if very large scenes cause OOM |
| | apply_z | False | Re-centers xy only, after GridSample | Keep as is |
| | keys | train keys + origin_*, name | Passes the original coordinates/labels and the scene name | Keep as is |
| offset_keys_dict | offset→coord, origin_offset→origin_coord | Generates the in-batch scene boundary offsets at both resolutions | Keep as is |
8. Hooks
| Hook | Parameter | Default | Description | Tuning guide |
| | keywords / replacement | "module." / "module." | Substitutes state_dict keys when loading | Prefix mapping when using weights from another framework |
| | warmup_iter | 2 | Excludes the first N iterations from timing | Keep as is |
| | (none) | Logs loss and lr to the log/tensorboard/wandb | Keep as is | |
| | segment_ignore_index | (-1, 0, 1) | Classes excluded from evaluation | Same as section 2 |
| instance_ignore_index | -1 | Same | ||
| (in code) min_region_sizes | 100 | Predictions with fewer than 100 points are excluded from evaluation | <span style="color:orange;font-weight:bold">Caution Not exposed in the config. Modify | |
| (in code) overlaps | 0.5~0.95 + 0.25 | IoU thresholds for AP calculation. Produces mAP, AP50, AP25 | Keep as is | |
| | save_freq | None | If None, saves only model_last + model_best. If an integer, also saves every N epochs | If there is enough disk space, set it to e.g. 100 so you can recover midway |
| | test_last | False | Runs precise evaluation with the tester after training ends. False uses the best checkpoint, True the last | Keep as is |
9. Tester
| Parameter | Default | Description | Tuning guide |
| | "InsSegTester" | Tester dedicated to instance seg | Keep as is |
| | (-1, 0, 1) | Same as section 2 | Same |
| | -1 | Same | |
| | False | Prints detailed per-scene results | True when analyzing failure types |
10. Summary of linked parameters
These are groups in which changing one value requires changing the others as well.
| Group | Items to change together |
| Voxel size | |
| Ignored classes | The single |
| Input features | |
| Backbone output | |
| Number of classes | Length of |
| Batch and lr | When changing |
| epoch | When changing |
| Small object filters | |
11. Recommended order of changes for improving small objects
- Without retraining:
cluster_min_points50→10,cluster_propose_points100→20, evaluatormin_region_sizes100→20, then rerun test - Retraining required, low cost: remove
SphereCropor set sample_rate 1.0,RandomDropoutdropout_ratio 0.1, removeElasticDistortion - Retraining required, high cost:
grid_size0.02→0.01 (+ readjust voxel_size and cluster_*, halve batch_size, halve lr) - Code changes: class weights in seg_loss, change bias_l1_loss to a per-instance average
12. Differences when using a PTv3 backbone (PG-v1m2)
Reference files: configs/scannetpp/insseg-pointgroup-v1m2-0-ptv3-base.py, model code pointcept/models/point_group/point_group_v1m2_custom_criteria.py
Of the parameters in sections 1–11 above, runtime, class definitions, cluster_*, voxel_size, dataset, val/test transform, hooks, and tester are all identical. Only the differences are listed below.
12.1 Model top level
| Parameter | SpUNet (PG-v1m1) | PTv3 (PG-v1m2) | Description / guide |
| | "PG-v1m1" | "PG-v1m2" | v1m2 takes the loss from the config and supports backbone freezing |
| | 96 | 64 | Must match PTv3 |
| | (none, CE fixed) | CrossEntropyLoss + LovaszLoss | <span style="color:orange;font-weight:bold">Caution Available only in v1m2. Lovasz optimizes IoU directly, which favors small classes. To add class weights, add |
| | (none) | False | If True, freezes the backbone and trains only the head. For linear evaluation of a pretrained backbone |
The offset regression losses (bias_l1, bias_cosine) are fixed in code and identical in both versions.
12.2 Backbone (PT-v3m1)
| Parameter | Default | Description | Tuning guide |
| | 6 | Input feature dimension | Same rule as SpUNet. Linked to feat_keys |
| | ("z", "z-trans", "hilbert", "hilbert-trans") | Types of space-filling curves used for point serialization | Keep as is. Fewer curves means faster, with slightly lower accuracy |
| | (2, 2, 2, 2) | Downsampling factor of each encoder stage | Keep as is |
| | (2, 2, 2, 6, 2) | Number of blocks in the 5 encoder stages | Model capacity. Increasing it raises memory/time |
| | (32, 64, 128, 256, 512) | Encoder channels | For small objects, enlarging the shallow-stage (32, 64) channels is effective |
| | (2, 4, 8, 16, 32) | Number of encoder attention heads | Keep channels / head = 16 |
| | 1024 × 5 | Patch (window) size of serialized attention | Can be reduced to 512 for small scenes. Directly affects memory |
| | (2, 2, 2, 2) | Number of blocks in the 4 decoder stages | Keep as is |
| | (64, 64, 128, 256) | Decoder channels. | <span style="color:red;font-weight:bold">Danger |
| | (4, 4, 8, 16) | Number of decoder heads | Keep channels / head = 16 |
| | 1024 × 4 | Decoder patch size | Same as enc |
| | 4 | FFN expansion ratio | Keep as is |
| | True | QKV projection bias | Keep as is |
| | None | attention scale. 1/√d if None | Keep as is |
| | 0.0 | attention / projection dropout | 0.1 if overfitting |
| | 0.3 | Stochastic depth rate | <span style="color:orange;font-weight:bold">Caution Keep 0.3 with little data, 0.1–0.2 with a lot. Lower it if underfitting |
| | True | Shuffles the serialization order on every forward (augmentation effect) | Keep as is |
| | True | Pre-LayerNorm structure | Keep as is |
| | False | Relative positional encoding | Slightly higher accuracy, lower speed. Cannot be used together with flash attention |
| | True | Uses FlashAttention | <span style="color:orange;font-weight:bold">Caution False on GPUs without flash-attn installed. When False, |
| | False | Computes attention in fp32 | True if NaN appears with flash disabled + AMP |
| | False | If True, encoder only (for classification) | False for segmentation |
| | bn/ln False, decouple True, adaptive False, affine True | Multi-dataset conditional normalization (PPT) settings | Keep all defaults for a single dataset. |
12.3 Optimizer / Scheduler
| Parameter | SpUNet | PTv3 | Description / guide |
| | SGD, lr 0.1, wd 1e-4 | AdamW, lr 0.006, wd 0.05 | <span style="color:red;font-weight:bold">Danger Transformers do not converge well with SGD. PTv3 must use AdamW |
| | PolyLR | OneCycleLR | Cosine decay after warmup (pct_start 5%). max_lr is a list per param group |
| | - | [0.006, 0.0006] | [default group, block group]. Matches the order of |
| | - | 0.05 | Warmup fraction of the total steps |
| | - | "cos" | Decay curve after warmup |
| | - | 10.0 | Starting lr = max_lr / 10 |
| | - | 1000.0 | Final lr = starting lr / 1000 |
| | None | [dict(keyword="block", lr=0.0006)] | <span style="color:orange;font-weight:bold">Caution Attention blocks get 1/10 of the lr. The standard setting when fine-tuning a pretrained backbone |
12.4 Train transform differences
| Transform | SpUNet | PTv3 | Notes |
| | 0.5 | 0.2 | PTv3 applies dropout less often. The PTv3 value is better for small objects |
| | 0.1 | 0.05 | Half the color offset |
| | | point_max=204800 | <span style="color:orange;font-weight:bold">Caution A cap on the point count, not a ratio crop. If a scene has 204800 points or fewer, no crop happens at all, so small objects are not cut off | |
| | No | Yes | PTv3 uses coordinates for positional encoding, so it needs re-centering after voxelization |
12.5 Summary
- Same: cluster_thresh, cluster_closed_points, cluster_min_points, cluster_propose_points, voxel_size, segment_ignore_index, GridSample 0.02, evaluator min_region_sizes 100
- Different: the entire backbone, backbone_out_channels (96→64), criteria (CE→CE+Lovasz), optimizer (SGD→AdamW), scheduler (PolyLR→OneCycleLR), param_dicts, the SphereCrop method, and some augmentation strengths
- From a small-object perspective, the PTv3 config is less aggressive than the SpUNet config because its SphereCrop is not ratio-based and its dropout application probability is lower. However, the size filters in the clustering stage are exactly the same, so even with a different backbone, the filter relaxation from section 11 is still needed.