Files
place6D_Nurburgring/Training/training.ipynb
2022-05-16 18:19:43 +03:00

85 lines
15 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "39a59328",
"metadata": {
"collapsed": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO:__main__:neural network device: cuda (CUDA available: True, count: 1)\n",
"INFO:openpifpaf.network.factory:filtering for dataset heads and extending existing heads\n",
"INFO:openpifpaf.network.losses.multi_head:multihead loss: ['apollo.cif.c', 'apollo.cif.vec', 'apollo.cif.scales', 'apollo.caf.c', 'apollo.caf.vec', 'apollo.caf.scales'], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]\n",
"INFO:__main__:Single GPU training\n",
"INFO:openpifpaf.logger:{'type': 'process', 'argv': ['C:\\\\Anaconda\\\\lib\\\\site-packages\\\\openpifpaf\\\\train.py', '--dataset', 'karusel', '--checkpoint=mobilenetv2', '--lr=0.00002', '--momentum=0.95', '--b-scale=5.0', '--epochs=151', '--lr-decay', '160', '260', '--lr-decay-epochs=10', '--weight-decay=1e-5', '--weight-decay=1e-5', '--val-interval', '10', '--loader-workers', '3', '--batch-size', '1', '--karusel-use-24-kps', '--karusel-square-edge=769', '--karusel-bmin', '2'], 'args': {'output': 'outputs/mobilenetv2-220516-170827-karusel.pkl', 'disable_cuda': False, 'ddp': False, 'local_rank': None, 'sync_batchnorm': True, 'quiet': False, 'debug': False, 'log_stats': False, 'shufflenetv2k_input_conv2_stride': 0, 'shufflenetv2k_input_conv2_outchannels': None, 'shufflenetv2k_stage4_dilation': 1, 'shufflenetv2k_kernel': 5, 'shufflenetv2k_conv5_as_stage': False, 'shufflenetv2k_instance_norm': False, 'shufflenetv2k_group_norm': False, 'shufflenetv2k_leaky_relu': False, 'squeezenet_pretrained': True, 'swin_drop_path_rate': 0.2, 'swin_input_upsample': False, 'swin_use_fpn': False, 'swin_fpn_out_channels': None, 'swin_fpn_level': 3, 'swin_pretrained': True, 'xcit_out_channels': None, 'xcit_out_maxpool': False, 'xcit_pretrained': True, 'mobilenetv3_pretrained': True, 'mobilenetv2_pretrained': True, 'resnet_pretrained': True, 'resnet_pool0_stride': 0, 'resnet_input_conv_stride': 2, 'resnet_input_conv2_stride': 0, 'resnet_block5_dilation': 1, 'resnet_remove_last_block': False, 'shufflenetv2_pretrained': True, 'cf4_dropout': 0.0, 'cf4_inplace_ops': True, 'checkpoint': 'mobilenetv2', 'basenet': None, 'cross_talk': 0.0, 'download_progress': True, 'head_consolidation': 'filter_and_extend', 'lambdas': None, 'component_lambdas': None, 'auto_tune_mtl': False, 'auto_tune_mtl_variance': False, 'task_sparsity_weight': 0.0, 'soft_clamp': 5.0, 'loss_prescale': 1.0, 'regression_loss': 'laplace', 'bce_total_soft_clamp': None, 'laplace_soft_clamp': 5.0, 'r_smooth': 0.0, 'b_scale': 5.0, 'scale_log': False, 'scale_soft_clamp': 5.0, 'background_weight': 1.0, 'focal_alpha': 0.5, 'focal_gamma': 1.0, 'focal_detach': False, 'focal_clamp': True, 'bce_min': 0.0, 'bce_soft_clamp': 5.0, 'bce_background_clamp': -15.0, 'epochs': 151, 'train_batches': None, 'val_batches': None, 'clip_grad_norm': 0.0, 'clip_grad_value': 0.0, 'log_interval': 11, 'val_interval': 10, 'stride_apply': 1, 'fix_batch_norm': False, 'ema': 0.01, 'profile': None, 'cif_side_length': 4, 'caf_min_size': 3, 'caf_fixed_size': False, 'caf_aspect_ratio': 0.0, 'encoder_suppress_selfhidden': True, 'encoder_suppress_invisible': False, 'encoder_suppress_collision': False, 'momentum': 0.95, 'beta2': 0.999, 'adam_eps': 1e-06, 'nesterov': True, 'weight_decay': 1e-05, 'adam': False, 'amsgrad': False, 'lr': 2e-05, 'lr_decay': [160.0, 260.0], 'lr_decay_factor': 0.1, 'lr_decay_epochs': 10.0, 'lr_warm_up_start_epoch': 0, 'lr_warm_up_epochs': 1, 'lr_warm_up_factor': 0.001, 'lr_warm_restarts': [], 'lr_warm_restart_duration': 0.5, 'dataset': 'karusel', 'loader_workers': 3, 'batch_size': 1, 'dataset_weights': None, 'animal_train_annotations': 'data-animalpose/annotations/animal_keypoints_20_train.json', 'animal_val_annotations': 'data-animalpose/annotations/animal_keypoints_20_val.json', 'animal_train_image_dir': 'data-animalpose/images/train/', 'animal_val_image_dir': 'data-animalpose/images/val/', 'animal_square_edge': 513, 'animal_extended_scale': False, 'animal_orientation_invariant': 0.0, 'animal_blur': 0.0, 'animal_augmentation': True, 'animal_rescale_images': 1.0, 'animal_upsample': 1, 'animal_min_kp_anns': 1, 'animal_bmin': 1, 'animal_eval_test2017': False, 'animal_eval_testdev2017': False, 'animal_eval_annotation_filter': True, 'animal_eval_long_edge': 0, 'animal_eval_extended_scale': False, 'animal_eval_orientation_invariant': 0.0, 'apollo_train_annotations': 'data-apollocar3d/annotations/apollo_keypoints_66_train.json', 'apollo_val_annotations': 'data-apollocar3d/annotations/apollo_keypoints_66_val.json', 'apollo_train_image_dir': 'data-apollocar3d/images/train/', 'apollo_val_image_dir': 'data-apollocar3d/images/val/', 'apollo_square_edge': 513, 'apollo_extended_scale': False, 'apollo_orientation_invariant': 0.0, 'apollo_blur': 0.0, 'apollo_augmentation': True, 'apollo_rescale_images': 1.0, 'apollo_upsample': 1, 'apollo_min_kp_anns': 1, 'apollo_bmin': 1, 'apollo_apply_local_centrality': False, 'apollo_eval_annotation_filter': True, 'apollo_eval_long_edge': 0, 'apollo_eval_extended_scale': False, 'apollo_eval_orientation_invariant': 0.0, 'apollo_use_24_kps': False, 'cifar10_root_dir': 'data-cifar10/', 'cifar10_download': False, 'cocodet_train_annotations': 'data-mscoco/annotations/instances_train2017.json', 'cocodet_val_annotations': 'data-mscoco/annotations/instances_val2017.json', 'cocodet_train_image_dir': 'data-mscoco/images/train2017/', 'cocodet_val_image_dir': 'data-mscoco/images/val2017/', 'cocodet_square_edge': 513, 'cocodet_extended_scale': False, 'cocodet_orientation_invariant': 0.0, 'cocodet_blur': 0.0, 'cocodet_augmentation': True, 'cocodet_rescale_images': 1.0, 'cocodet_upsample': 1, 'cocokp_train_annotations': 'data-mscoco/annotations/person_keypoints_train2017.json', 'cocokp_val_annotations': 'data-mscoco/annotations/person_keypoints_val2017.json', 'cocokp_train_image_dir': 'data-mscoco/images/train2017/', 'cocokp_val_image_dir': 'data-mscoco/images/val2017/', 'cocokp_square_edge': 385, 'cocokp_with_dense': False, 'cocokp_extended_scale': False, 'cocokp_orientation_invariant': 0.0, 'cocokp_blur': 0.0, 'cocokp_augmentation': True, 'cocokp_rescale_images': 1.0, 'cocokp_upsample': 1, 'cocokp_min_kp_anns': 1, 'cocokp_bmin': 0.1, 'cocokp_eval_test2017': False, 'cocokp_eval_testdev2017': False, 'coco_eval_annotation_filter': True, 'coco_eval_long_edge': 641, 'coco_eval_extended_scale': False, 'coco_eval_orientation_invariant': 0.0, 'crowdpose_train_annotations': 'data-crowdpose/json/crowdpose_train.json', 'crowdpose_val_annotations': 'data-crowdpose/json/crowdpose_val.json', 'crowdpose_image_dir': 'data-crowdpose/images/', 'crowdpose_square_edge': 385, 'crowdpose_extended_scale': False, 'crowdpose_orientation_invariant': 0.0, 'crowdpose_augmentation': True, 'crowdpose_rescale_images': 1.0, 'crowdpose_upsample': 1, 'crowdpose_min_kp_anns': 1, 'crowdpose_eval_test': False, 'crowdpose_eval_long_edge': 641, 'crowdpose_eval_extended_scale': False, 'crowdpose_eval_orientation_invariant': 0.0, 'crowdpose_index': None, 'nuscenes_train_annotations': '../../../NuScenes/mscoco_style_annotations/nuimages_v1.0-train.json', 'nuscenes_val_annotations': '../../../NuScenes/mscoco_style_annotations/nuimages_v1.0-val.json', 'nuscenes_train_image_dir': '../../../NuScenes/nuimages-v1.0-all-samples', 'nuscenes_val_image_dir': '../../../NuScenes/nuimages-v1.0-all-samples', 'nuscenes_square_edge': 513, 'nuscenes_extended_scale': False, 'nuscenes_orientation_invariant': 0.0, 'nuscenes_blur': 0.0, 'nuscenes_augmentation': True, 'nuscenes_rescale_images': 1.0, 'nuscenes_upsample': 1, 'karusel_train_annotations': 'Karusel_dataset-COCO/annotations/train.json', 'karusel_val_annotations': 'Karusel_dataset-COCO/annotations/val.json', 'karusel_train_image_dir': 'Karusel_dataset-COCO/images/train/', 'karusel_val_image_dir': 'Karusel_dataset-COCO/images/val/', 'karusel_square_edge': 769, 'karusel_extended_scale': False, 'karusel_orientation_invariant': 0.0, 'karusel_blur': 0.0, 'karusel_augmentation': True, 'karusel_rescale_images': 1.0, 'karusel_upsample': 1, 'karusel_min_kp_anns': 1, 'karusel_bmin': 2, 'karusel_apply_local_centrality': False, 'karusel_eval_annotation_filter': True, 'karusel_eval_long_edge': 0, 'karusel_eval_extended_scale': False, 'karusel_eval_orientation_invariant': 0.0, 'karusel_use_24_kps': True, 'posetrack2018_train_annotations': 'data-posetrack2018/annotations/train/*.json', 'posetrack2018_val_annotations': 'data-posetrack2018/annotations/val/*.json', 'posetrack2018_eval_annotations': 'data-posetrack2018/annotations/val/*.json', 'posetrack2018_data_root': 'data-posetrack2018', 'posetrack_square_edge': 385, 'posetrack_with_dense': False, 'posetrack_augmentation': True, 'posetrack_rescale_images': 1.0, 'posetrack_upsample': 1, 'posetrack_min_kp_anns': 1, 'posetrack_bmin': 0.1, 'posetrack_sample_pairing': 0.0, 'posetrack_image_augmentations': 0.0, 'posetrack_max_shift': 30.0, 'posetrack_eval_long_edge': 801, 'posetrack_eval_extended_scale': False, 'posetrack_eval_orientation_invariant': 0.0, 'posetrack_ablation_without_tcaf': False, 'posetrack2017_eval_annotations': 'data-posetrack2017/annotations/val/*.json', 'posetrack2017_data_root': 'data-posetrack2017', 'cocokpst_max_shift': 30.0, 'wholebody_train_annotations': 'data-mscoco/annotations/person_keypoints_train2017_wholebody_pifpaf_style.json', 'wholebody_val_annotations': 'data-mscoco/annotations/coco_wholebody_val_v1.0.json', 'wholebody_train_image_dir': 'data-mscoco/images/train2017/', 'wholebody_val_image_dir': 'data-mscoco/images/val2017', 'wholebody_square_edge': 385, 'wholebody_extended_scale': False, 'wholebody_orientation_invariant': 0.0, 'wholebody_blur': 0.0, 'wholebody_augmentation': True, 'wholebody_rescale_images': 1.0, 'wholebody_upsample': 1, 'wholebody_min_kp_anns': 1, 'wholebody_bmin': 1.0, 'wholebody_apply_local_centrality': False, 'wholebody_eval_test2017': False, 'wholebody_eval_testdev2017': False, 'wholebody_eval_annotation_filter': True, 'wholebody_eval_long_edge': 641, 'wholebody_eval_extended_scale': False, 'wholebody_eval_orientation_invariant': 0.0, 'save_all': None, 'show': False, 'image_width': None, 'image_height': None, 'image_dpi_factor': 2.0, 'image_min_dpi': 50.0, 'show_file_extension': 'jpeg', 'textbox_alpha': 0.5, 'text_color': 'white', 'font_size': 8, 'monocolor_connections': False, 'line_width': None, 'skeleton_solid_threshold': 0.5, 'show_box': False, 'white_overlay': False, 'show_joint_scales': False, 'show_joint_confidences': False, 'show_decoding_order': False, 'show_frontier_order': False, 'show_only_decoded_connections': False, 'video_fps': 10, 'video_dpi': 100, 'debug_indices': [], 'device': device(type='cuda'), 'pin_memory': True}, 'version': '0.13.3', 'plugin_versions': {'openpifpaf_karussel': 'unknown'}, 'hostname': 'DESKTOP-9FV4E0P'}\n",
"loading annotations into memory...\n",
"Done (t=0.00s)\n",
"creating index...\n",
"index created!\n",
"INFO:openpifpaf.plugins.coco.dataset:filter for annotations (min kp=1) ...\n",
"INFO:openpifpaf.plugins.coco.dataset:... done.\n",
"INFO:openpifpaf.plugins.coco.dataset:Images: 104\n",
"loading annotations into memory...\n",
"Done (t=0.00s)\n",
"creating index...\n",
"index created!\n",
"INFO:openpifpaf.plugins.coco.dataset:filter for annotations (min kp=1) ...\n",
"INFO:openpifpaf.plugins.coco.dataset:... done.\n",
"INFO:openpifpaf.plugins.coco.dataset:Images: 12\n",
"INFO:openpifpaf.optimize:SGD optimizer\n",
"INFO:openpifpaf.optimize:training batches per epoch = 104\n",
"INFO:openpifpaf.network.trainer:{'type': 'config', 'field_names': ['apollo.cif.c', 'apollo.cif.vec', 'apollo.cif.scales', 'apollo.caf.c', 'apollo.caf.vec', 'apollo.caf.scales']}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 0, 'n_batches': 104, 'time': 3.312, 'data_time': 9.933, 'lr': 2e-05, 'loss': 3996.015, 'head_losses': [381.82, 1338.938, 2.815, 422.177, 1845.92, 4.346]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 11, 'n_batches': 104, 'time': 0.11, 'data_time': 0.0, 'lr': 2e-05, 'loss': 2537.655, 'head_losses': [108.509, 748.191, 1.287, 225.264, 1452.322, 2.082]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 22, 'n_batches': 104, 'time': 0.145, 'data_time': 0.0, 'lr': 2e-05, 'loss': 3143.217, 'head_losses': [110.165, 1304.007, 3.605, 168.33, 1549.557, 7.551]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 33, 'n_batches': 104, 'time': 0.114, 'data_time': 0.838, 'lr': 2e-05, 'loss': 2561.634, 'head_losses': [104.38, 760.872, 0.937, 145.966, 1548.282, 1.197]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 44, 'n_batches': 104, 'time': 0.158, 'data_time': 0.598, 'lr': 2e-05, 'loss': 3077.632, 'head_losses': [94.998, 1271.543, 1.153, 115.789, 1591.439, 2.709]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 55, 'n_batches': 104, 'time': 0.147, 'data_time': 0.548, 'lr': 2e-05, 'loss': 3387.694, 'head_losses': [117.256, 1455.369, 14.965, 120.495, 1657.198, 22.411]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 66, 'n_batches': 104, 'time': 0.136, 'data_time': 0.0, 'lr': 2e-05, 'loss': 2697.875, 'head_losses': [141.474, 840.148, 1.025, 203.103, 1510.888, 1.238]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 77, 'n_batches': 104, 'time': 0.124, 'data_time': 0.0, 'lr': 2e-05, 'loss': 2917.647, 'head_losses': [117.105, 1214.693, 1.097, 128.015, 1454.447, 2.292]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 88, 'n_batches': 104, 'time': 0.112, 'data_time': 0.0, 'lr': 2e-05, 'loss': 2877.594, 'head_losses': [117.213, 1145.017, 0.308, 142.698, 1471.487, 0.872]}\n",
"INFO:openpifpaf.network.trainer:{'type': 'train', 'epoch': 150, 'batch': 99, 'n_batches': 104, 'time': 0.134, 'data_time': 0.0, 'lr': 2e-05, 'loss': 537.43, 'head_losses': [29.236, 148.922, 0.908, 44.595, 312.376, 1.394]}\n",
"INFO:openpifpaf.network.trainer:applying ema\n",
"INFO:openpifpaf.network.trainer:{'type': 'train-epoch', 'epoch': 151, 'loss': 2661.64299, 'head_losses': [103.41938, 976.64185, 3.44785, 147.09363, 1425.81744, 5.22282], 'time': 58.1, 'n_clipped_grad': 0, 'max_norm': 0.0}\n",
"INFO:openpifpaf.network.trainer:model written: outputs/mobilenetv2-220516-170827-karusel.pkl.epoch151\n",
"INFO:openpifpaf.network.trainer:{'type': 'val-epoch', 'epoch': 151, 'loss': 2293.58988, 'head_losses': [75.23923, 780.86423, 1.6363, 120.32408, 1312.80143, 2.72463], 'time': 13.4}\n"
]
}
],
"source": [
"!python -m openpifpaf.train --dataset karusel \\\n",
"--checkpoint=mobilenetv2 --lr=0.00002 --momentum=0.95 --b-scale=5.0 \\\n",
"--epochs=151 --lr-decay 160 260 --lr-decay-epochs=10 --weight-decay=1e-5 \\\n",
"--weight-decay=1e-5 --val-interval 10 --loader-workers 3 \\\n",
"--batch-size 1 --karusel-use-24-kps --karusel-square-edge=769 --karusel-bmin 2"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}