Epoch 1: improved checkpoint (val_loss=0.1466)
Browse files- README.md +22 -0
- config.json +31 -0
- model_best.pt +3 -0
- model_last.pt +3 -0
- pytorch_model.bin +3 -0
- 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,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backbone": "hf_vit",
|
| 3 |
+
"hf_repo": "ImageInpainters/ViTInpainter",
|
| 4 |
+
"download_model": true,
|
| 5 |
+
"upload_model": true,
|
| 6 |
+
"upload_epochs": 1,
|
| 7 |
+
"img_size": 224,
|
| 8 |
+
"patch_size": 16,
|
| 9 |
+
"batch_size": 4,
|
| 10 |
+
"val_batch_size": 4,
|
| 11 |
+
"num_workers": 2,
|
| 12 |
+
"epochs": 20,
|
| 13 |
+
"dim": 192,
|
| 14 |
+
"depth": 6,
|
| 15 |
+
"heads": 6,
|
| 16 |
+
"mlp_ratio": 4.0,
|
| 17 |
+
"dropout": 0.1,
|
| 18 |
+
"decoder_dim": 256,
|
| 19 |
+
"lr": 0.0002,
|
| 20 |
+
"encoder_lr_scale": 0.1,
|
| 21 |
+
"weight_decay": 0.0001,
|
| 22 |
+
"valid_weight": 0.05,
|
| 23 |
+
"boundary_weight": 0.25,
|
| 24 |
+
"boundary_kernel_size": 7,
|
| 25 |
+
"pretrained_model_name": "/kaggle/input/datasets/rjawesome/pretrained-vit/vit_base_patch16_224",
|
| 26 |
+
"freeze_pretrained_embeddings": true,
|
| 27 |
+
"freeze_pretrained_blocks": 10,
|
| 28 |
+
"train_dir": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/train2017",
|
| 29 |
+
"val_dir": "/kaggle/input/datasets/awsaf49/coco-2017-dataset/coco2017/val2017",
|
| 30 |
+
"output_dir": "/kaggle/working/outputs_inpaint_bert"
|
| 31 |
+
}
|
model_best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a22d984aba8ac5619694f41f664820e3b72d46d7ef9830ae22a3b30bd410221b
|
| 3 |
+
size 661197302
|
model_last.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0f489a35ad6ff4b5a0cda01cd053a22af15194b1f131030f4b1365ddc6bbf2c
|
| 3 |
+
size 661197302
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7412834540fb8497bd8d5190906d2597abc1508108b877abbb7369c1012d53b9
|
| 3 |
+
size 411436855
|
training_metadata.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1,
|
| 3 |
+
"val_loss": 0.1466214737147093,
|
| 4 |
+
"backbone": "hf_vit"
|
| 5 |
+
}
|