Skip to content

Commit 8a97857

Browse files
committed
fix_assert_model_version
1 parent db89776 commit 8a97857

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

roboflow/core/version.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,37 @@ def live_plot(epochs, mAP, loss, title=""):
446446

447447
time.sleep(5)
448448

449+
if not self.model:
450+
if self.type == TYPE_OBJECT_DETECTION:
451+
self.model = ObjectDetectionModel(
452+
self.__api_key,
453+
self.id,
454+
self.name,
455+
self.version,
456+
colors=self.colors,
457+
preprocessing=self.preprocessing,
458+
)
459+
elif self.type == TYPE_CLASSICATION:
460+
self.model = ClassificationModel(
461+
self.__api_key,
462+
self.id,
463+
self.name,
464+
self.version,
465+
colors=self.colors,
466+
preprocessing=self.preprocessing,
467+
)
468+
elif self.type == TYPE_INSTANCE_SEGMENTATION:
469+
self.model = InstanceSegmentationModel(
470+
self.__api_key,
471+
self.id,
472+
colors=self.colors,
473+
preprocessing=self.preprocessing,
474+
)
475+
elif self.type == TYPE_SEMANTIC_SEGMENTATION:
476+
self.model = SemanticSegmentationModel(self.__api_key, self.id)
477+
elif self.type == TYPE_KEYPOINT_DETECTION:
478+
self.model = KeypointDetectionModel(self.__api_key, self.id, version=self.version)
479+
449480
# return the model object
450481
assert self.model
451482
return self.model

0 commit comments

Comments
 (0)