Skip to content
Snippets Groups Projects
Commit 3fbdf930 authored by Martin's avatar Martin
Browse files

no more best_classes

parent a5a40182
No related branches found
No related tags found
No related merge requests found
Pipeline #74326 passed
......@@ -172,13 +172,13 @@ class HTRDataGenerator:
try:
accepted_zones = []
for elt in self.api_client.cached_paginate(
"ListElementChildren", id=page_id, with_best_classes=True
"ListElementChildren", id=page_id, with_classes=True
):
printed = True
for classification in elt["best_classes"]:
for classification in elt["classes"]:
if classification["ml_class"]["name"] == "handwritten":
printed = False
for classification in elt["best_classes"]:
for classification in elt["classes"]:
if classification["ml_class"]["name"] in self.accepted_classes:
if self.should_filter_printed:
if not printed:
......@@ -336,7 +336,7 @@ class HTRDataGenerator:
return {
elem["id"]: [
best_class["ml_class"]["name"]
for best_class in elem["best_classes"]
for best_class in elem["classes"]
if best_class["state"] != "rejected"
]
for elem in self.api_client.cached_paginate(
......@@ -344,7 +344,7 @@ class HTRDataGenerator:
id=page_id,
recursive=True,
type=TEXT_LINE,
with_best_classes=True,
with_classes=True,
)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment