Skip to content

Commit

Permalink
fix(onnx): missing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
QIN2DIM committed Nov 21, 2023
1 parent 13fc8f2 commit 8e1f847
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hcaptcha_challenger/onnx/modelhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ def parse_objects(self):
self.ashes_of_war = yolo2names

nested_categories = data.get("nested_categories", {})
if nested_categories:
self.nested_categories = nested_categories
self.nested_categories = nested_categories or {}

self.circle_segment_model = data.get(
"circle_seg", "appears_only_once_2309_yolov8s-seg.onnx"
Expand All @@ -381,11 +380,10 @@ def parse_objects(self):
if datalake:
for prompt, serialized_binary in datalake.items():
datalake[prompt] = DataLake.from_serialized(serialized_binary)
self.datalake = datalake
self.datalake = datalake or {}

clip_candidates = data.get("clip_candidates", {})
if clip_candidates:
self.clip_candidates = clip_candidates
self.clip_candidates = clip_candidates or {}

def pull_model(self, focus_name: str):
"""
Expand Down

0 comments on commit 8e1f847

Please sign in to comment.