aaawesome commited on
Commit
2c010d2
·
verified ·
1 Parent(s): fa0dfa6

Epoch 1: improved checkpoint (val_loss=0.1515)

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/liBERTy4.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.2,
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:8344dc33a23894d7035b2e66da9e34ef86ac8029b6cf89a17d7ba1e80432a711
3
+ size 136758554
model_last.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b5acc9488a464ca8d4c562d9ee413e974266c013826d99e9f416196b4f19373
3
+ size 136758554
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0036da094fd1ff67b8ecc47b3a865fb467c42bdba613dc0d36b5092b25f21e34
3
+ size 45582127
training_metadata.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1,
3
+ "val_loss": 0.15148435279726982,
4
+ "backbone": "custom"
5
+ }