|
@@ -12,6 +12,7 @@ from pycs.database.Result import Result
|
|
|
from pycs.frontend.notifications.NotificationList import NotificationList
|
|
|
from pycs.frontend.notifications.NotificationManager import NotificationManager
|
|
|
from pycs.interfaces.MediaFile import MediaFile
|
|
|
+from pycs.interfaces.MediaLabel import MediaLabel
|
|
|
from pycs.interfaces.MediaBoundingBox import MediaBoundingBox
|
|
|
from pycs.interfaces.MediaStorage import MediaStorage
|
|
|
from pycs.jobs.JobGroupBusyException import JobGroupBusyException
|
|
@@ -170,7 +171,10 @@ class PredictModel(View):
|
|
|
|
|
|
# Add the labels determined in the inference process.
|
|
|
for i, result in enumerate(result_filter[file_id]):
|
|
|
- result.label_id = bbox_labels[i].identifier
|
|
|
+ bbox_label = bbox_labels[i]
|
|
|
+ if isinstance(bbox_label, MediaLabel):
|
|
|
+ result.label_id = bbox_label.identifier
|
|
|
+
|
|
|
result.set_origin('user', commit=True)
|
|
|
notifications.add(notification_manager.edit_result, result)
|
|
|
|