aaawesome commited on
Commit
217dee2
·
verified ·
1 Parent(s): 25ec73b

Epoch 1: improved checkpoint (val_loss=0.1428)

Browse files
Files changed (6) hide show
  1. README.md +22 -0
  2. config.json +41 -0
  3. model_best.pt +3 -0
  4. model_last.pt +3 -0
  5. pytorch_model.bin +3 -0
  6. training_metadata.json +5 -0
README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - image-inpainting
5
+ - masked-image-modeling
6
+ - bidirectional-transformer
7
+ - custom-model
8
+ ---
9
+
10
+ # Better Inpainting Transformer
11
+
12
+ This repository contains the improved inpainting model.
13
+
14
+ ## Files
15
+ - `pytorch_model.bin`: inference weights
16
+ - `config.json`: config
17
+ - `training_metadata.json`: epoch and val loss for best uploaded checkpoint
18
+ - `model_last.pt`: resumable training checkpoint
19
+ - `model_best.pt`: best local checkpoint
20
+
21
+ ## Notes
22
+ Recreate the `BetterInpaintTransformer` class and load the state dict manually.
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backbone": "custom",
3
+ "hf_repo": "ImageInpainters/liBERTy3.0",
4
+ "download_model": true,
5
+ "upload_model": true,
6
+ "upload_epochs": 1,
7
+ "data_root": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017",
8
+ "train_dir": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/train2017",
9
+ "val_dir": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/val2017",
10
+ "train_ann_file": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/annotations/instances_train2017.json",
11
+ "val_ann_file": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/annotations/instances_val2017.json",
12
+ "img_size": 128,
13
+ "patch_size": 8,
14
+ "batch_size": 16,
15
+ "val_batch_size": 8,
16
+ "num_workers": 2,
17
+ "epochs": 20,
18
+ "dim": 192,
19
+ "depth": 6,
20
+ "heads": 6,
21
+ "mlp_ratio": 4.0,
22
+ "dropout": 0.1,
23
+ "decoder_dim": 192,
24
+ "lr": 0.0002,
25
+ "encoder_lr_scale": 0.1,
26
+ "weight_decay": 0.0001,
27
+ "valid_weight": 0.0,
28
+ "boundary_weight": 0.05,
29
+ "grad_weight": 0.05,
30
+ "boundary_kernel_size": 7,
31
+ "object_sample_prob": 0.6,
32
+ "dilate_object_mask_px": 4,
33
+ "min_object_area_ratio": 0.01,
34
+ "max_object_area_ratio": 0.4,
35
+ "min_paste_scale": 0.7,
36
+ "max_paste_scale": 1.3,
37
+ "pretrained_model_name": "google/vit-base-patch16-224-in21k",
38
+ "freeze_pretrained_embeddings": true,
39
+ "freeze_pretrained_blocks": 8,
40
+ "output_dir": "/kaggle/working/outputs_inpaint_bert"
41
+ }
model_best.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4ee4696263dc999a74de6aab4a192d281696e7fdcfbfdc0a6092df623b3c643
3
+ size 136758554
model_last.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c4cde11407cd8767c88e10fc470e00604a0eaee813a12fb80e837aefc7480df
3
+ size 136758554
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81c99b6b60bb99b1cde7b026fd3c392df72fb54d299f08966cc6132e5d2ac495
3
+ size 45582127
training_metadata.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1,
3
+ "val_loss": 0.14278978335857392,
4
+ "backbone": "custom"
5
+ }