2025-05-13 20:40:45,056 SSD INFO: Using 1 GPUs
2025-05-13 20:40:45,057 SSD INFO: Namespace(config_file='configs/vgg_ssd300_voc0712.yaml', local_rank=0, log_step=10, save_step=2500, eval_step=2500, use_tensorboard=True, skip_test=False, opts=[], distributed=False, num_gpus=1)
2025-05-13 20:40:45,057 SSD INFO: Loaded configuration file configs/vgg_ssd300_voc0712.yaml
2025-05-13 20:40:45,057 SSD INFO:
MODEL:
NUM_CLASSES: 5
INPUT:
IMAGE_SIZE: 300
DATASETS:
TRAIN: ("voc_2007_trainval", "voc_2012_trainval")
TEST: ("voc_2007_test", )
SOLVER:
MAX_ITER: 120000
LR_STEPS: [80000, 100000]
GAMMA: 0.1
BATCH_SIZE: 32
LR: 1e-3
OUTPUT_DIR: 'outputs/vgg_ssd300_voc0712'
2025-05-13 20:40:45,058 SSD INFO: Running with config:
DATASETS:
TEST: ('voc_2007_test',)
TRAIN: ('voc_2007_trainval', 'voc_2012_trainval')
DATA_LOADER:
NUM_WORKERS: 8
PIN_MEMORY: True
INPUT:
IMAGE_SIZE: 300
PIXEL_MEAN: [123, 117, 104]
MODEL:
BACKBONE:
NAME: vgg
OUT_CHANNELS: (512, 1024, 512, 256, 256, 256)
PRETRAINED: True
BOX_HEAD:
NAME: SSDBoxHead
PREDICTOR: SSDBoxPredictor
CENTER_VARIANCE: 0.1
DEVICE: cuda
META_ARCHITECTURE: SSDDetector
NEG_POS_RATIO: 3
NUM_CLASSES: 5
PRIORS:
ASPECT_RATIOS: [[2], [2, 3], [2, 3], [2, 3], [2], [2]]
BOXES_PER_LOCATION: [4, 6, 6, 6, 4, 4]
CLIP: True
FEATURE_MAPS: [38, 19, 10, 5, 3, 1]
MAX_SIZES: [60, 111, 162, 213, 264, 315]
MIN_SIZES: [30, 60, 111, 162, 213, 264]
STRIDES: [8, 16, 32, 64, 100, 300]
SIZE_VARIANCE: 0.2
THRESHOLD: 0.5
OUTPUT_DIR: outputs/vgg_ssd300_voc0712
SOLVER:
BATCH_SIZE: 32
GAMMA: 0.1
LR: 0.001
LR_STEPS: [80000, 100000]
MAX_ITER: 120000
MOMENTUM: 0.9
WARMUP_FACTOR: 0.3333333333333333
WARMUP_ITERS: 500
WEIGHT_DECAY: 0.0005
TEST:
BATCH_SIZE: 10
CONFIDENCE_THRESHOLD: 0.01
MAX_PER_CLASS: -1
MAX_PER_IMAGE: 100
NMS_THRESHOLD: 0.45
D:\SSDcode\SSD-master\ssd\utils\model_zoo.py:62: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle modu
le implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#u
ntrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpi
ckling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We rec
ommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
return torch.load(cached_file, map_location=map_location)
2025-05-13 20:40:45,690 SSD.trainer INFO: No checkpoint found.
2025-05-13 20:40:45,734 SSD.trainer INFO: Start training ...
Traceback (most recent call last):
File "D:\SSDcode\SSD-master\train.py", line 114, in <module>
main()
File "D:\SSDcode\SSD-master\train.py", line 105, in main
model = train(cfg, args)
File "D:\SSDcode\SSD-master\train.py", line 44, in train
model = do_train(cfg, model, train_loader, optimizer, scheduler, checkpointer, device, arguments, args)
File "D:\SSDcode\SSD-master\ssd\engine\trainer.py", line 76, in do_train
for iteration, (images, targets, _) in enumerate(data_loader, start_iter):
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\dataloader.py", line 701, in __next__
data = self._next_data()
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\dataloader.py", line 1465, in _next_data
return self._process_data(data)
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\dataloader.py", line 1491, in _process_data
data.reraise()
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\_utils.py", line 715, in reraise
raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\_utils\worker.py", line 351, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\_utils\fetch.py", line 52, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\_utils\fetch.py", line 52, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\wulianwang\an\an1\envs\ssd\lib\site-packages\torch\utils\data\dataset.py", line 350, in __getitem__
return self.datasets[dataset_idx][sample_idx]
File "D:\SSDcode\SSD-master\ssd\data\datasets\voc.py", line 33, in __getitem__
boxes, labels, is_difficult = self._get_annotation(image_id)
File "D:\SSDcode\SSD-master\ssd\data\datasets\voc.py", line 78, in _get_annotation
labels.append(self.class_dict[class_name])
KeyError: '3'