Add model implementation and training output
Browse files- .gitignore +178 -0
- Detectron2_DocLayNet.ipynb +0 -0
- README.md +41 -0
- config.yml +328 -0
- load_the_model.ipynb +0 -0
- metadata.json +1 -0
- output/events.out.tfevents.1724410384.Legion.1993.0 +3 -0
- output/events.out.tfevents.1725745992.Legion.508902.0 +3 -0
- output/last_checkpoint +1 -0
- output/metrics.json +0 -0
- output/model_final.pth +3 -0
- requirements.txt +180 -0
.gitignore
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
share/python-wheels/
|
24 |
+
*.egg-info/
|
25 |
+
.installed.cfg
|
26 |
+
*.egg
|
27 |
+
MANIFEST
|
28 |
+
|
29 |
+
# PyInstaller
|
30 |
+
# Usually these files are written by a python script from a template
|
31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32 |
+
*.manifest
|
33 |
+
*.spec
|
34 |
+
|
35 |
+
# Installer logs
|
36 |
+
pip-log.txt
|
37 |
+
pip-delete-this-directory.txt
|
38 |
+
|
39 |
+
# Unit test / coverage reports
|
40 |
+
htmlcov/
|
41 |
+
.tox/
|
42 |
+
.nox/
|
43 |
+
.coverage
|
44 |
+
.coverage.*
|
45 |
+
.cache
|
46 |
+
nosetests.xml
|
47 |
+
coverage.xml
|
48 |
+
*.cover
|
49 |
+
*.py,cover
|
50 |
+
.hypothesis/
|
51 |
+
.pytest_cache/
|
52 |
+
cover/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
.pybuilder/
|
76 |
+
target/
|
77 |
+
|
78 |
+
# Jupyter Notebook
|
79 |
+
.ipynb_checkpoints
|
80 |
+
|
81 |
+
# IPython
|
82 |
+
profile_default/
|
83 |
+
ipython_config.py
|
84 |
+
|
85 |
+
# pyenv
|
86 |
+
# For a library or package, you might want to ignore these files since the code is
|
87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
88 |
+
# .python-version
|
89 |
+
|
90 |
+
# pipenv
|
91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94 |
+
# install all needed dependencies.
|
95 |
+
#Pipfile.lock
|
96 |
+
|
97 |
+
# poetry
|
98 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100 |
+
# commonly ignored for libraries.
|
101 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
102 |
+
#poetry.lock
|
103 |
+
|
104 |
+
# pdm
|
105 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
106 |
+
#pdm.lock
|
107 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
108 |
+
# in version control.
|
109 |
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
110 |
+
.pdm.toml
|
111 |
+
.pdm-python
|
112 |
+
.pdm-build/
|
113 |
+
|
114 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
115 |
+
__pypackages__/
|
116 |
+
|
117 |
+
# Celery stuff
|
118 |
+
celerybeat-schedule
|
119 |
+
celerybeat.pid
|
120 |
+
|
121 |
+
# SageMath parsed files
|
122 |
+
*.sage.py
|
123 |
+
|
124 |
+
# Environments
|
125 |
+
.env
|
126 |
+
.venv
|
127 |
+
env/
|
128 |
+
venv/
|
129 |
+
ENV/
|
130 |
+
env.bak/
|
131 |
+
venv.bak/
|
132 |
+
|
133 |
+
# Spyder project settings
|
134 |
+
.spyderproject
|
135 |
+
.spyproject
|
136 |
+
|
137 |
+
# Rope project settings
|
138 |
+
.ropeproject
|
139 |
+
|
140 |
+
# mkdocs documentation
|
141 |
+
/site
|
142 |
+
|
143 |
+
# mypy
|
144 |
+
.mypy_cache/
|
145 |
+
.dmypy.json
|
146 |
+
dmypy.json
|
147 |
+
|
148 |
+
# Pyre type checker
|
149 |
+
.pyre/
|
150 |
+
|
151 |
+
# pytype static type analyzer
|
152 |
+
.pytype/
|
153 |
+
|
154 |
+
# Cython debug symbols
|
155 |
+
cython_debug/
|
156 |
+
|
157 |
+
# PyCharm
|
158 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
159 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
160 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
161 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
162 |
+
#.idea/
|
163 |
+
|
164 |
+
# output folders
|
165 |
+
/output
|
166 |
+
/output_first_try
|
167 |
+
/output_second_try
|
168 |
+
/output_publaynet
|
169 |
+
|
170 |
+
# datasets
|
171 |
+
/FUNSD
|
172 |
+
|
173 |
+
# pictures
|
174 |
+
*.jpg
|
175 |
+
*.png
|
176 |
+
|
177 |
+
# configs
|
178 |
+
*.json
|
Detectron2_DocLayNet.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Detectron2 + DocLayNet
|
2 |
+
|
3 |
+
Model made for document layout analysis
|
4 |
+
|
5 |
+
## Load the model
|
6 |
+
|
7 |
+
First install the required dependencies:
|
8 |
+
|
9 |
+
```bash
|
10 |
+
pip install -r requirements.txt
|
11 |
+
```
|
12 |
+
|
13 |
+
In a `.py` or `.ipynb` file:
|
14 |
+
|
15 |
+
```python
|
16 |
+
import cv2
|
17 |
+
import json
|
18 |
+
import matplotlib.pyplot as plt
|
19 |
+
from detectron2.utils.visualizer import Visualizer
|
20 |
+
from detectron2.data import Metadata
|
21 |
+
from detectron2.config import get_cfg
|
22 |
+
from detectron2.engine import DefaultPredictor
|
23 |
+
|
24 |
+
cfg = get_cfg()
|
25 |
+
cfg.merge_from_file("config.yml")
|
26 |
+
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.7 # set the testing threshold for this model
|
27 |
+
|
28 |
+
with open("metadata.json", "r") as f:
|
29 |
+
metadata_dict = json.load(f)
|
30 |
+
|
31 |
+
predictor = DefaultPredictor(cfg)
|
32 |
+
metadata = Metadata()
|
33 |
+
metadata.set(thing_classes=metadata_dict["thing_classes"])
|
34 |
+
im = cv2.imread("image.jpg")
|
35 |
+
output = predictor(im)
|
36 |
+
v = Visualizer(im[:, :, ::-1], metadata=metadata, scale=0.8)
|
37 |
+
v = v.draw_instance_predictions(output["instances"].to("cpu"))
|
38 |
+
plt.figure(figsize=(14,10))
|
39 |
+
plt.imshow(cv2.cvtColor(v.get_image()[:, :, ::-1], cv2.COLOR_BGR2RGB))
|
40 |
+
plt.show()
|
41 |
+
```
|
config.yml
ADDED
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
CUDNN_BENCHMARK: false
|
2 |
+
DATALOADER:
|
3 |
+
ASPECT_RATIO_GROUPING: true
|
4 |
+
FILTER_EMPTY_ANNOTATIONS: true
|
5 |
+
NUM_WORKERS: 2
|
6 |
+
REPEAT_SQRT: true
|
7 |
+
REPEAT_THRESHOLD: 0.0
|
8 |
+
SAMPLER_TRAIN: TrainingSampler
|
9 |
+
DATASETS:
|
10 |
+
PRECOMPUTED_PROPOSAL_TOPK_TEST: 1000
|
11 |
+
PRECOMPUTED_PROPOSAL_TOPK_TRAIN: 2000
|
12 |
+
PROPOSAL_FILES_TEST: []
|
13 |
+
PROPOSAL_FILES_TRAIN: []
|
14 |
+
TEST:
|
15 |
+
- test
|
16 |
+
TRAIN:
|
17 |
+
- train
|
18 |
+
GLOBAL:
|
19 |
+
HACK: 1.0
|
20 |
+
INPUT:
|
21 |
+
CROP:
|
22 |
+
ENABLED: false
|
23 |
+
SIZE:
|
24 |
+
- 0.9
|
25 |
+
- 0.9
|
26 |
+
TYPE: relative_range
|
27 |
+
FORMAT: BGR
|
28 |
+
MASK_FORMAT: polygon
|
29 |
+
MAX_SIZE_TEST: 1333
|
30 |
+
MAX_SIZE_TRAIN: 1333
|
31 |
+
MIN_SIZE_TEST: 800
|
32 |
+
MIN_SIZE_TRAIN:
|
33 |
+
- 640
|
34 |
+
- 672
|
35 |
+
- 704
|
36 |
+
- 736
|
37 |
+
- 768
|
38 |
+
- 800
|
39 |
+
MIN_SIZE_TRAIN_SAMPLING: choice
|
40 |
+
RANDOM_FLIP: horizontal
|
41 |
+
MODEL:
|
42 |
+
ANCHOR_GENERATOR:
|
43 |
+
ANGLES:
|
44 |
+
- - -90
|
45 |
+
- 0
|
46 |
+
- 90
|
47 |
+
ASPECT_RATIOS:
|
48 |
+
- - 0.5
|
49 |
+
- 1.0
|
50 |
+
- 2.0
|
51 |
+
NAME: DefaultAnchorGenerator
|
52 |
+
OFFSET: 0.0
|
53 |
+
SIZES:
|
54 |
+
- - 32
|
55 |
+
- - 64
|
56 |
+
- - 128
|
57 |
+
- - 256
|
58 |
+
- - 512
|
59 |
+
BACKBONE:
|
60 |
+
FREEZE_AT: 2
|
61 |
+
NAME: build_resnet_fpn_backbone
|
62 |
+
DEVICE: cuda
|
63 |
+
FPN:
|
64 |
+
FUSE_TYPE: sum
|
65 |
+
IN_FEATURES:
|
66 |
+
- res2
|
67 |
+
- res3
|
68 |
+
- res4
|
69 |
+
- res5
|
70 |
+
NORM: ''
|
71 |
+
OUT_CHANNELS: 256
|
72 |
+
KEYPOINT_ON: false
|
73 |
+
LOAD_PROPOSALS: false
|
74 |
+
MASK_ON: false
|
75 |
+
META_ARCHITECTURE: GeneralizedRCNN
|
76 |
+
PANOPTIC_FPN:
|
77 |
+
COMBINE:
|
78 |
+
ENABLED: true
|
79 |
+
INSTANCES_CONFIDENCE_THRESH: 0.5
|
80 |
+
OVERLAP_THRESH: 0.5
|
81 |
+
STUFF_AREA_LIMIT: 4096
|
82 |
+
INSTANCE_LOSS_WEIGHT: 1.0
|
83 |
+
PIXEL_MEAN:
|
84 |
+
- 103.53
|
85 |
+
- 116.28
|
86 |
+
- 123.675
|
87 |
+
PIXEL_STD:
|
88 |
+
- 1.0
|
89 |
+
- 1.0
|
90 |
+
- 1.0
|
91 |
+
PROPOSAL_GENERATOR:
|
92 |
+
MIN_SIZE: 0
|
93 |
+
NAME: RPN
|
94 |
+
RESNETS:
|
95 |
+
DEFORM_MODULATED: false
|
96 |
+
DEFORM_NUM_GROUPS: 1
|
97 |
+
DEFORM_ON_PER_STAGE:
|
98 |
+
- false
|
99 |
+
- false
|
100 |
+
- false
|
101 |
+
- false
|
102 |
+
DEPTH: 101
|
103 |
+
NORM: FrozenBN
|
104 |
+
NUM_GROUPS: 1
|
105 |
+
OUT_FEATURES:
|
106 |
+
- res2
|
107 |
+
- res3
|
108 |
+
- res4
|
109 |
+
- res5
|
110 |
+
RES2_OUT_CHANNELS: 256
|
111 |
+
RES5_DILATION: 1
|
112 |
+
STEM_OUT_CHANNELS: 64
|
113 |
+
STRIDE_IN_1X1: true
|
114 |
+
WIDTH_PER_GROUP: 64
|
115 |
+
RETINANET:
|
116 |
+
BBOX_REG_LOSS_TYPE: smooth_l1
|
117 |
+
BBOX_REG_WEIGHTS: &id002
|
118 |
+
- 1.0
|
119 |
+
- 1.0
|
120 |
+
- 1.0
|
121 |
+
- 1.0
|
122 |
+
FOCAL_LOSS_ALPHA: 0.25
|
123 |
+
FOCAL_LOSS_GAMMA: 2.0
|
124 |
+
IN_FEATURES:
|
125 |
+
- p3
|
126 |
+
- p4
|
127 |
+
- p5
|
128 |
+
- p6
|
129 |
+
- p7
|
130 |
+
IOU_LABELS:
|
131 |
+
- 0
|
132 |
+
- -1
|
133 |
+
- 1
|
134 |
+
IOU_THRESHOLDS:
|
135 |
+
- 0.4
|
136 |
+
- 0.5
|
137 |
+
NMS_THRESH_TEST: 0.5
|
138 |
+
NORM: ''
|
139 |
+
NUM_CLASSES: 80
|
140 |
+
NUM_CONVS: 4
|
141 |
+
PRIOR_PROB: 0.01
|
142 |
+
SCORE_THRESH_TEST: 0.05
|
143 |
+
SMOOTH_L1_LOSS_BETA: 0.1
|
144 |
+
TOPK_CANDIDATES_TEST: 1000
|
145 |
+
ROI_BOX_CASCADE_HEAD:
|
146 |
+
BBOX_REG_WEIGHTS:
|
147 |
+
- &id001
|
148 |
+
- 10.0
|
149 |
+
- 10.0
|
150 |
+
- 5.0
|
151 |
+
- 5.0
|
152 |
+
- - 20.0
|
153 |
+
- 20.0
|
154 |
+
- 10.0
|
155 |
+
- 10.0
|
156 |
+
- - 30.0
|
157 |
+
- 30.0
|
158 |
+
- 15.0
|
159 |
+
- 15.0
|
160 |
+
IOUS:
|
161 |
+
- 0.5
|
162 |
+
- 0.6
|
163 |
+
- 0.7
|
164 |
+
ROI_BOX_HEAD:
|
165 |
+
BBOX_REG_LOSS_TYPE: smooth_l1
|
166 |
+
BBOX_REG_LOSS_WEIGHT: 1.0
|
167 |
+
BBOX_REG_WEIGHTS: *id001
|
168 |
+
CLS_AGNOSTIC_BBOX_REG: false
|
169 |
+
CONV_DIM: 256
|
170 |
+
FC_DIM: 1024
|
171 |
+
FED_LOSS_FREQ_WEIGHT_POWER: 0.5
|
172 |
+
FED_LOSS_NUM_CLASSES: 50
|
173 |
+
NAME: FastRCNNConvFCHead
|
174 |
+
NORM: ''
|
175 |
+
NUM_CONV: 0
|
176 |
+
NUM_FC: 2
|
177 |
+
POOLER_RESOLUTION: 7
|
178 |
+
POOLER_SAMPLING_RATIO: 0
|
179 |
+
POOLER_TYPE: ROIAlignV2
|
180 |
+
SMOOTH_L1_BETA: 0.0
|
181 |
+
TRAIN_ON_PRED_BOXES: false
|
182 |
+
USE_FED_LOSS: false
|
183 |
+
USE_SIGMOID_CE: false
|
184 |
+
ROI_HEADS:
|
185 |
+
BATCH_SIZE_PER_IMAGE: 128
|
186 |
+
IN_FEATURES:
|
187 |
+
- p2
|
188 |
+
- p3
|
189 |
+
- p4
|
190 |
+
- p5
|
191 |
+
IOU_LABELS:
|
192 |
+
- 0
|
193 |
+
- 1
|
194 |
+
IOU_THRESHOLDS:
|
195 |
+
- 0.5
|
196 |
+
NAME: StandardROIHeads
|
197 |
+
NMS_THRESH_TEST: 0.5
|
198 |
+
NUM_CLASSES: 11
|
199 |
+
POSITIVE_FRACTION: 0.25
|
200 |
+
PROPOSAL_APPEND_GT: true
|
201 |
+
SCORE_THRESH_TEST: 0.7
|
202 |
+
ROI_KEYPOINT_HEAD:
|
203 |
+
CONV_DIMS:
|
204 |
+
- 512
|
205 |
+
- 512
|
206 |
+
- 512
|
207 |
+
- 512
|
208 |
+
- 512
|
209 |
+
- 512
|
210 |
+
- 512
|
211 |
+
- 512
|
212 |
+
LOSS_WEIGHT: 1.0
|
213 |
+
MIN_KEYPOINTS_PER_IMAGE: 1
|
214 |
+
NAME: KRCNNConvDeconvUpsampleHead
|
215 |
+
NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS: true
|
216 |
+
NUM_KEYPOINTS: 17
|
217 |
+
POOLER_RESOLUTION: 14
|
218 |
+
POOLER_SAMPLING_RATIO: 0
|
219 |
+
POOLER_TYPE: ROIAlignV2
|
220 |
+
ROI_MASK_HEAD:
|
221 |
+
CLS_AGNOSTIC_MASK: false
|
222 |
+
CONV_DIM: 256
|
223 |
+
NAME: MaskRCNNConvUpsampleHead
|
224 |
+
NORM: ''
|
225 |
+
NUM_CONV: 4
|
226 |
+
POOLER_RESOLUTION: 14
|
227 |
+
POOLER_SAMPLING_RATIO: 0
|
228 |
+
POOLER_TYPE: ROIAlignV2
|
229 |
+
RPN:
|
230 |
+
BATCH_SIZE_PER_IMAGE: 256
|
231 |
+
BBOX_REG_LOSS_TYPE: smooth_l1
|
232 |
+
BBOX_REG_LOSS_WEIGHT: 1.0
|
233 |
+
BBOX_REG_WEIGHTS: *id002
|
234 |
+
BOUNDARY_THRESH: -1
|
235 |
+
CONV_DIMS:
|
236 |
+
- -1
|
237 |
+
HEAD_NAME: StandardRPNHead
|
238 |
+
IN_FEATURES:
|
239 |
+
- p2
|
240 |
+
- p3
|
241 |
+
- p4
|
242 |
+
- p5
|
243 |
+
- p6
|
244 |
+
IOU_LABELS:
|
245 |
+
- 0
|
246 |
+
- -1
|
247 |
+
- 1
|
248 |
+
IOU_THRESHOLDS:
|
249 |
+
- 0.3
|
250 |
+
- 0.7
|
251 |
+
LOSS_WEIGHT: 1.0
|
252 |
+
NMS_THRESH: 0.7
|
253 |
+
POSITIVE_FRACTION: 0.5
|
254 |
+
POST_NMS_TOPK_TEST: 1000
|
255 |
+
POST_NMS_TOPK_TRAIN: 1000
|
256 |
+
PRE_NMS_TOPK_TEST: 1000
|
257 |
+
PRE_NMS_TOPK_TRAIN: 2000
|
258 |
+
SMOOTH_L1_BETA: 0.0
|
259 |
+
SEM_SEG_HEAD:
|
260 |
+
COMMON_STRIDE: 4
|
261 |
+
CONVS_DIM: 128
|
262 |
+
IGNORE_VALUE: 255
|
263 |
+
IN_FEATURES:
|
264 |
+
- p2
|
265 |
+
- p3
|
266 |
+
- p4
|
267 |
+
- p5
|
268 |
+
LOSS_WEIGHT: 1.0
|
269 |
+
NAME: SemSegFPNHead
|
270 |
+
NORM: GN
|
271 |
+
NUM_CLASSES: 54
|
272 |
+
WEIGHTS: ./output/model_final.pth
|
273 |
+
OUTPUT_DIR: ./output
|
274 |
+
SEED: -1
|
275 |
+
SOLVER:
|
276 |
+
AMP:
|
277 |
+
ENABLED: false
|
278 |
+
BASE_LR: 1.0e-05
|
279 |
+
BASE_LR_END: 0.0
|
280 |
+
BIAS_LR_FACTOR: 1.0
|
281 |
+
CHECKPOINT_PERIOD: 5000
|
282 |
+
CLIP_GRADIENTS:
|
283 |
+
CLIP_TYPE: value
|
284 |
+
CLIP_VALUE: 1.0
|
285 |
+
ENABLED: false
|
286 |
+
NORM_TYPE: 2.0
|
287 |
+
GAMMA: 0.1
|
288 |
+
IMS_PER_BATCH: 2
|
289 |
+
LR_SCHEDULER_NAME: WarmupMultiStepLR
|
290 |
+
MAX_ITER: 85000
|
291 |
+
MOMENTUM: 0.9
|
292 |
+
NESTEROV: false
|
293 |
+
NUM_DECAYS: 3
|
294 |
+
REFERENCE_WORLD_SIZE: 0
|
295 |
+
RESCALE_INTERVAL: false
|
296 |
+
STEPS:
|
297 |
+
- 210000
|
298 |
+
- 250000
|
299 |
+
WARMUP_FACTOR: 0.001
|
300 |
+
WARMUP_ITERS: 1000
|
301 |
+
WARMUP_METHOD: linear
|
302 |
+
WEIGHT_DECAY: 0.0001
|
303 |
+
WEIGHT_DECAY_BIAS: null
|
304 |
+
WEIGHT_DECAY_NORM: 0.0
|
305 |
+
TEST:
|
306 |
+
AUG:
|
307 |
+
ENABLED: false
|
308 |
+
FLIP: true
|
309 |
+
MAX_SIZE: 4000
|
310 |
+
MIN_SIZES:
|
311 |
+
- 400
|
312 |
+
- 500
|
313 |
+
- 600
|
314 |
+
- 700
|
315 |
+
- 800
|
316 |
+
- 900
|
317 |
+
- 1000
|
318 |
+
- 1100
|
319 |
+
- 1200
|
320 |
+
DETECTIONS_PER_IMAGE: 100
|
321 |
+
EVAL_PERIOD: 0
|
322 |
+
EXPECTED_RESULTS: []
|
323 |
+
KEYPOINT_OKS_SIGMAS: []
|
324 |
+
PRECISE_BN:
|
325 |
+
ENABLED: false
|
326 |
+
NUM_ITER: 200
|
327 |
+
VERSION: 2
|
328 |
+
VIS_PERIOD: 0
|
load_the_model.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
metadata.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "train", "thing_classes": ["Caption", "Footnote", "Formula", "List-item", "Page-footer", "Page-header", "Picture", "Section-header", "Table", "Text", "Title"]}
|
output/events.out.tfevents.1724410384.Legion.1993.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d34d88c2bc95494c1e75c1e46bb2d5d7123d30f189cea548a9291c48adb02222
|
3 |
+
size 3934313
|
output/events.out.tfevents.1725745992.Legion.508902.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1ab5ae006e63f68b45f2706cf1c815c502c15257acb92872e19db70a1e551440
|
3 |
+
size 171412
|
output/last_checkpoint
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
model_final.pth
|
output/metrics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/model_final.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c645471f4eede20a57da47df492c71e8b21e6f956ef84dee801ec15a262df1c
|
3 |
+
size 351189924
|
requirements.txt
ADDED
@@ -0,0 +1,180 @@
|
|
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set-normalizer==3.3.2
|
17 |
+
click==8.1.7
|
18 |
+
cloudpickle==3.0.0
|
19 |
+
colorama==0.4.4
|
20 |
+
comm==0.2.2
|
21 |
+
command-not-found==0.3
|
22 |
+
commonmark==0.9.1
|
23 |
+
contourpy==1.2.1
|
24 |
+
cov-core==1.15.0
|
25 |
+
coverage==6.2
|
26 |
+
cryptography==3.4.8
|
27 |
+
cycler==0.12.1
|
28 |
+
datasets==2.21.0
|
29 |
+
dbus-python==1.2.18
|
30 |
+
debugpy==1.8.5
|
31 |
+
decorator==5.1.1
|
32 |
+
detectron2 @ git+https://github.com/facebookresearch/detectron2.git@bcfd464d0c810f0442d91a349c0f6df945467143
|
33 |
+
dill==0.3.8
|
34 |
+
distro==1.7.0
|
35 |
+
distro-info==1.1+ubuntu0.2
|
36 |
+
exceptiongroup==1.2.2
|
37 |
+
execnet==1.9.0
|
38 |
+
executing==2.0.1
|
39 |
+
filelock==3.15.4
|
40 |
+
flake8==4.0.1
|
41 |
+
fonttools==4.53.1
|
42 |
+
frozenlist==1.4.1
|
43 |
+
fsspec==2024.6.1
|
44 |
+
fvcore==0.1.5.post20221221
|
45 |
+
grpcio==1.65.5
|
46 |
+
h11==0.13.0
|
47 |
+
html5lib==1.1
|
48 |
+
httpcore==0.14.5
|
49 |
+
httplib2==0.20.2
|
50 |
+
httpx==0.22.0
|
51 |
+
huggingface-hub==0.24.6
|
52 |
+
hydra-core==1.3.2
|
53 |
+
idna==3.7
|
54 |
+
importlib-metadata==4.6.4
|
55 |
+
iniconfig==1.1.1
|
56 |
+
iopath==0.1.9
|
57 |
+
ipykernel==6.29.5
|
58 |
+
ipython==8.26.0
|
59 |
+
isort==5.6.4
|
60 |
+
jedi==0.19.1
|
61 |
+
jeepney==0.7.1
|
62 |
+
Jinja2==3.1.4
|
63 |
+
jupyter_client==8.6.2
|
64 |
+
jupyter_core==5.7.2
|
65 |
+
keyring==23.5.0
|
66 |
+
kiwisolver==1.4.5
|
67 |
+
launchpadlib==1.10.16
|
68 |
+
lazr.restfulclient==0.14.4
|
69 |
+
lazr.uri==1.0.6
|
70 |
+
livereload==2.6.3
|
71 |
+
lxml==4.8.0
|
72 |
+
Markdown==3.7
|
73 |
+
MarkupSafe==2.1.5
|
74 |
+
matplotlib==3.9.2
|
75 |
+
matplotlib-inline==0.1.7
|
76 |
+
mccabe==0.6.1
|
77 |
+
mercurial==6.1.1
|
78 |
+
mkdocs==1.1.2
|
79 |
+
more-itertools==8.10.0
|
80 |
+
mpmath==1.3.0
|
81 |
+
multidict==6.0.5
|
82 |
+
multiprocess==0.70.16
|
83 |
+
mypy==0.942
|
84 |
+
mypy-extensions==1.0.0
|
85 |
+
nala==0.11.1
|
86 |
+
nest-asyncio==1.6.0
|
87 |
+
netifaces==0.11.0
|
88 |
+
networkx==3.3
|
89 |
+
nose2==0.9.2
|
90 |
+
numpy==2.1.0
|
91 |
+
nvidia-cublas-cu12==12.1.3.1
|
92 |
+
nvidia-cuda-cupti-cu12==12.1.105
|
93 |
+
nvidia-cuda-nvrtc-cu12==12.1.105
|
94 |
+
nvidia-cuda-runtime-cu12==12.1.105
|
95 |
+
nvidia-cudnn-cu12==9.1.0.70
|
96 |
+
nvidia-cufft-cu12==11.0.2.54
|
97 |
+
nvidia-curand-cu12==10.3.2.106
|
98 |
+
nvidia-cusolver-cu12==11.4.5.107
|
99 |
+
nvidia-cusparse-cu12==12.1.0.106
|
100 |
+
nvidia-nccl-cu12==2.20.5
|
101 |
+
nvidia-nvjitlink-cu12==12.6.20
|
102 |
+
nvidia-nvtx-cu12==12.1.105
|
103 |
+
oauthlib==3.2.0
|
104 |
+
omegaconf==2.3.0
|
105 |
+
opencv-python==4.10.0.84
|
106 |
+
opencv-python-headless==4.10.0.84
|
107 |
+
packaging==24.1
|
108 |
+
pandas==2.2.2
|
109 |
+
parso==0.8.4
|
110 |
+
pathspec==0.12.1
|
111 |
+
pexpect==4.9.0
|
112 |
+
pillow==10.4.0
|
113 |
+
platformdirs==4.2.2
|
114 |
+
pluggy==0.13.0
|
115 |
+
portalocker==2.10.1
|
116 |
+
prompt_toolkit==3.0.47
|
117 |
+
protobuf==5.27.3
|
118 |
+
psutil==6.0.0
|
119 |
+
ptyprocess==0.7.0
|
120 |
+
pure_eval==0.2.3
|
121 |
+
py==1.10.0
|
122 |
+
pyarrow==17.0.0
|
123 |
+
pycocotools==2.0.8
|
124 |
+
pycodestyle==2.8.0
|
125 |
+
pyflakes==2.4.0
|
126 |
+
Pygments==2.18.0
|
127 |
+
PyGObject==3.42.1
|
128 |
+
pyinotify==0.9.6
|
129 |
+
PyJWT==2.3.0
|
130 |
+
pyparsing==3.1.2
|
131 |
+
pytest==6.2.5
|
132 |
+
pytest-cov==3.0.0
|
133 |
+
pytest-forked==1.4.0
|
134 |
+
pytest-sugar==0.9.4
|
135 |
+
pytest-xdist==2.5.0
|
136 |
+
python-apt==2.4.0+ubuntu3
|
137 |
+
python-dateutil==2.9.0.post0
|
138 |
+
pytz==2024.1
|
139 |
+
PyYAML==6.0.2
|
140 |
+
pyzmq==26.1.1
|
141 |
+
requests==2.32.3
|
142 |
+
rfc3986==1.5.0
|
143 |
+
rich==11.2.0
|
144 |
+
SecretStorage==3.3.1
|
145 |
+
shellingham==1.4.0
|
146 |
+
six==1.16.0
|
147 |
+
sniffio==1.2.0
|
148 |
+
socksio==1.0.0
|
149 |
+
soupsieve==2.3.1
|
150 |
+
stack-data==0.6.3
|
151 |
+
sympy==1.13.2
|
152 |
+
systemd-python==234
|
153 |
+
tabulate==0.9.0
|
154 |
+
tensorboard==2.17.1
|
155 |
+
tensorboard-data-server==0.7.2
|
156 |
+
termcolor==2.4.0
|
157 |
+
toml==0.10.2
|
158 |
+
tomli==2.0.1
|
159 |
+
torch==2.4.0
|
160 |
+
torchvision==0.19.0
|
161 |
+
tornado==6.4.1
|
162 |
+
tqdm==4.66.5
|
163 |
+
traitlets==5.14.3
|
164 |
+
triton==3.0.0
|
165 |
+
typed-ast==1.4.3
|
166 |
+
typer==0.4.0
|
167 |
+
typing_extensions==4.12.2
|
168 |
+
tzdata==2024.1
|
169 |
+
ubuntu-pro-client==8001
|
170 |
+
ufw==0.36.1
|
171 |
+
unattended-upgrades==0.1
|
172 |
+
urllib3==2.2.2
|
173 |
+
wadllib==1.3.6
|
174 |
+
wcwidth==0.2.13
|
175 |
+
webencodings==0.5.1
|
176 |
+
Werkzeug==3.0.3
|
177 |
+
xxhash==3.5.0
|
178 |
+
yacs==0.1.8
|
179 |
+
yarl==1.9.4
|
180 |
+
zipp==1.0.0
|