NorwayFish commited on
Commit
bcf342f
·
verified ·
1 Parent(s): 4dd820a

Clean reexport of ogkalu/comic-text-and-bubble-detector

Browse files
README.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ RT-DETR-v2 r50vd model fine-tuned on about 11k Manga, Webtoon, Manhua and Western Comic style Images for text and speech bubble detection.<br>
5
+ Training Image Size = 640. Training Images were resized, not cropped.<br>Tall Webtoons were split vertically.<br>
6
+ Classes are:<br>
7
+ 0: bubble<br>
8
+ 1: text_bubble (text inside bubbles)<br>
9
+ 2: text_free (text outside bubbles)<br>
config.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dropout": 0.0,
3
+ "activation_function": "silu",
4
+ "anchor_image_size": null,
5
+ "architectures": [
6
+ "RTDetrV2ForObjectDetection"
7
+ ],
8
+ "attention_dropout": 0.0,
9
+ "auxiliary_loss": true,
10
+ "backbone": null,
11
+ "backbone_config": {
12
+ "model_type": "rt_detr_resnet",
13
+ "out_features": [
14
+ "stage2",
15
+ "stage3",
16
+ "stage4"
17
+ ],
18
+ "out_indices": [
19
+ 2,
20
+ 3,
21
+ 4
22
+ ]
23
+ },
24
+ "backbone_kwargs": null,
25
+ "batch_norm_eps": 1e-05,
26
+ "box_noise_scale": 1.0,
27
+ "d_model": 256,
28
+ "decoder_activation_function": "relu",
29
+ "decoder_attention_heads": 8,
30
+ "decoder_ffn_dim": 1024,
31
+ "decoder_in_channels": [
32
+ 256,
33
+ 256,
34
+ 256
35
+ ],
36
+ "decoder_layers": 6,
37
+ "decoder_method": "default",
38
+ "decoder_n_levels": 3,
39
+ "decoder_n_points": 4,
40
+ "decoder_offset_scale": 0.5,
41
+ "dropout": 0.0,
42
+ "encode_proj_layers": [
43
+ 2
44
+ ],
45
+ "encoder_activation_function": "gelu",
46
+ "encoder_attention_heads": 8,
47
+ "encoder_ffn_dim": 1024,
48
+ "encoder_hidden_dim": 256,
49
+ "encoder_in_channels": [
50
+ 512,
51
+ 1024,
52
+ 2048
53
+ ],
54
+ "encoder_layers": 1,
55
+ "eos_coefficient": 0.0001,
56
+ "eval_size": null,
57
+ "feat_strides": [
58
+ 8,
59
+ 16,
60
+ 32
61
+ ],
62
+ "focal_loss_alpha": 0.75,
63
+ "focal_loss_gamma": 2.0,
64
+ "freeze_backbone_batch_norms": true,
65
+ "hidden_expansion": 1.0,
66
+ "id2label": {
67
+ "0": "bubble",
68
+ "1": "text_bubble",
69
+ "2": "text_free"
70
+ },
71
+ "initializer_bias_prior_prob": null,
72
+ "initializer_range": 0.01,
73
+ "is_encoder_decoder": true,
74
+ "label2id": {
75
+ "bubble": 0,
76
+ "text_bubble": 1,
77
+ "text_free": 2
78
+ },
79
+ "label_noise_ratio": 0.5,
80
+ "layer_norm_eps": 1e-05,
81
+ "learn_initial_query": false,
82
+ "matcher_alpha": 0.25,
83
+ "matcher_bbox_cost": 5.0,
84
+ "matcher_class_cost": 2.0,
85
+ "matcher_gamma": 2.0,
86
+ "matcher_giou_cost": 2.0,
87
+ "model_type": "rt_detr_v2",
88
+ "normalize_before": false,
89
+ "num_denoising": 100,
90
+ "num_feature_levels": 3,
91
+ "num_queries": 300,
92
+ "positional_encoding_temperature": 10000,
93
+ "torch_dtype": "float32",
94
+ "transformers_version": "4.49.0",
95
+ "use_focal_loss": true,
96
+ "use_pretrained_backbone": false,
97
+ "use_timm_backbone": false,
98
+ "weight_loss_bbox": 5.0,
99
+ "weight_loss_giou": 2.0,
100
+ "weight_loss_vfl": 1.0,
101
+ "with_box_refine": true
102
+ }
detector-v4-s_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fe9e4f576e49d4e7e8b0e029d6d3cdc252abd4694113e1cae120e62c931ea79
3
+ size 11120765
detector.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:065744e91c0594ad8663aa8b870ce3fb27222942eded5a3cc388ce23421bd195
3
+ size 168481531
detector_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5022ad46416b6fe4f88b0cc082cfd2ff5b1cfc624088c2f19879485493f5913
3
+ size 43838857
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:037930a861e67870eb345be01b28cc70d7e2b7956528e48ee0ebdb0c093df80d
3
+ size 171543900
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_annotations": true,
3
+ "do_normalize": false,
4
+ "do_pad": false,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "format": "coco_detection",
8
+ "image_mean": [
9
+ 0.485,
10
+ 0.456,
11
+ 0.406
12
+ ],
13
+ "image_processor_type": "RTDetrImageProcessor",
14
+ "image_std": [
15
+ 0.229,
16
+ 0.224,
17
+ 0.225
18
+ ],
19
+ "pad_size": null,
20
+ "resample": 2,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "height": 640,
24
+ "width": 640
25
+ }
26
+ }