Files
torchvision-vibecoding-project/configs/pennfudan_maskrcnn_config.py

35 lines
1.0 KiB
Python

"""
Configuration for MaskRCNN training on the PennFudan Dataset.
"""
config = {
# Data settings
"data_root": "data/PennFudanPed",
"output_dir": "outputs",
# Hardware settings
"device": "cuda", # "cuda" or "cpu"
# Model settings
"num_classes": 2, # Background + person
# Training settings
"batch_size": 1, # Reduced from 2 to 1 to save memory
"num_epochs": 10,
"seed": 42,
# Optimizer settings
"lr": 0.002,
"momentum": 0.9,
"weight_decay": 0.0005,
"lr_step_size": 3,
"lr_gamma": 0.1,
# Logging and checkpoints
"log_freq": 10, # Log every N steps
"checkpoint_freq": 1, # Save checkpoint every N epochs
# Run identification
"config_name": "pennfudan_maskrcnn_v1",
# DataLoader settings
"pin_memory": False, # Set to False to reduce memory usage
"num_workers": 2, # Reduced from 4 to 2 to reduce memory pressure
}
# Ensure derived paths or settings are consistent if needed
# (Not strictly necessary with this simple structure)