Skip to content

Commit

Permalink
Update train
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgarthur committed Jan 1, 2025
1 parent 40297d8 commit 945e5e7
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 298 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Train
run: |
cd scripts
python train.py $(echo "${{github.ref_name}}" | tr -d 'v\-model')
python train.py --epochs=1 --version $(echo "${{github.ref_name}}" | tr -d 'v\-model')
mv current_model.pth ../models/
- name: Convert to ONNX
Expand Down
7 changes: 6 additions & 1 deletion integrations/neanes/OcrAnalysis.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
export class OcrAnalysis {
public model_version: string = "";
public model_metadata: ModelMetadata = new ModelMetadata();
public pages: PageAnalysis[] = [];
}

export class ModelMetadata {
public model_version: string = "";
public classes: string[] = [];
}

export class PageAnalysis {
public segmentation: Segmentation = new Segmentation();
public matches: ContourMatch[] = [];
Expand Down
55 changes: 0 additions & 55 deletions models/classes.json

This file was deleted.

114 changes: 57 additions & 57 deletions models/metadata.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
{
"model_version": "1.0.1",
"classes": [
"antikenoma",
"antikenoma_apli",
"apli",
"apostrofos",
"argon",
"digorgon",
"elafron",
"elafron_apostrofos",
"elafron_syndesmos",
"flat_2",
"flat_4",
"fthora_diatonic_di",
"fthora_diatonic_ke",
"fthora_diatonic_ni",
"fthora_diatonic_pa",
"fthora_enharmonic",
"fthora_hard_chromatic_di",
"fthora_hard_chromatic_pa",
"fthora_soft_chromatic_di",
"gorgon",
"hamili",
"heteron",
"ison",
"ison_di",
"ison_ke",
"ison_low",
"ison_ni",
"ison_pa",
"ison_unison",
"kentima",
"klasma",
"kronos",
"martyria_diatonic_di",
"martyria_diatonic_ga",
"martyria_diatonic_ke",
"martyria_diatonic_zo_low",
"martyria_root_di",
"martyria_root_pa",
"martyria_soft_chromatic_di",
"num_2",
"num_3",
"num_4",
"oligon",
"omalon",
"paren_left",
"paren_right",
"petaste",
"psifiston",
"sharp_2",
"trigorgon",
"vareia",
"yporroe",
"ypsili"
]
}
"model_version": "0.0.2",
"classes": [
"antikenoma",
"antikenoma_apli",
"apli",
"apostrofos",
"argon",
"digorgon",
"elafron",
"elafron_apostrofos",
"elafron_syndesmos",
"flat_2",
"flat_4",
"fthora_diatonic_di",
"fthora_diatonic_ke",
"fthora_diatonic_ni",
"fthora_diatonic_pa",
"fthora_enharmonic",
"fthora_hard_chromatic_di",
"fthora_hard_chromatic_pa",
"fthora_soft_chromatic_di",
"gorgon",
"hamili",
"heteron",
"ison",
"ison_di",
"ison_ke",
"ison_low",
"ison_ni",
"ison_pa",
"ison_unison",
"kentima",
"klasma",
"kronos",
"martyria_diatonic_di",
"martyria_diatonic_ga",
"martyria_diatonic_ke",
"martyria_diatonic_zo_low",
"martyria_root_di",
"martyria_root_pa",
"martyria_soft_chromatic_di",
"num_2",
"num_3",
"num_4",
"oligon",
"omalon",
"paren_left",
"paren_right",
"petaste",
"psifiston",
"sharp_2",
"trigorgon",
"vareia",
"yporroe",
"ypsili"
]
}
2 changes: 1 addition & 1 deletion scripts/create_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def setup(img_transform=None, contour_filter=None):
default="../data/__unclassified",
)
parser.add_argument(
"--classes",
"--meta",
help="Relative path to the model's metadata file",
default="../models/metadata.json",
)
Expand Down
Loading

0 comments on commit 945e5e7

Please sign in to comment.