|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- {
- "framework": "pytorch",
-
- "task": "image_classification",
-
- "model": {
- "type": "Resnet50ForImageClassification",
- "pretrained": null,
- "backbone": {
- "type": "ResNet",
- "depth": 50,
- "out_indices": [
- 4
- ],
- "norm_cfg": {
- "type": "BN"
- }
- },
- "head": {
- "type": "ClsHead",
- "with_avg_pool": true,
- "in_channels": 2048,
- "loss_config": {
- "type": "CrossEntropyLossWithLabelSmooth",
- "label_smooth": 0
- },
- "num_classes": 1000
- }
- },
-
- "dataset": {
- "train": {
- "type": "ClsDataset",
- "data_source": {
- "list_file": "data/imagenet_raw/meta/train_labeled.txt",
- "root": "data/imagenet_raw/train/",
- "type": "ClsSourceImageList"
- }
- },
- "val": {
- "type": "ClsDataset",
- "data_source": {
- "list_file": "data/imagenet_raw/meta/val_labeled.txt",
- "root": "data/imagenet_raw/validation/",
- "type": "ClsSourceImageList"
- }
- }
- },
-
-
- "preprocessor":{
- "train": [
- {
- "type": "RandomResizedCrop",
- "size": 224
- },
- {
- "type": "RandomHorizontalFlip"
- },
- {
- "type": "ToTensor"
- },
- {
- "type": "Normalize",
- "mean": [
- 0.485,
- 0.456,
- 0.406
- ],
- "std": [
- 0.229,
- 0.224,
- 0.225
- ]
- },
- {
- "type": "Collect",
- "keys": [
- "img",
- "gt_labels"
- ]
- }
- ],
- "val": [
- {
- "type": "Resize",
- "size": 256
- },
- {
- "type": "CenterCrop",
- "size": 224
- },
- {
- "type": "ToTensor"
- },
- {
- "type": "Normalize",
- "mean": [
- 0.485,
- 0.456,
- 0.406
- ],
- "std": [
- 0.229,
- 0.224,
- 0.225
- ]
- },
- {
- "type": "Collect",
- "keys": [
- "img",
- "gt_labels"
- ]
- }
- ]
- },
-
- "train": {
- "batch_size": 32,
- "learning_rate": 0.00001,
- "lr_scheduler_type": "cosine",
- "num_epochs": 20
- },
-
- "evaluation": {
- "batch_size": 32,
- "metrics": ["accuracy", "precision", "recall"]
- }
-
- }
|