Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ValueError: operands could not be broadcast together with shapes (X, ) (Y, ) #8179

Merged
merged 3 commits into from
Jul 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cvat/apps/dataset_manager/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ def _init_shapes_from_db(self):
for db_shape in db_shapes:
self._extend_attributes(db_shape.attributes,
self.db_attributes[db_shape.label_id]["all"].values())
if db_shape['type'] == str(models.ShapeType.SKELETON):
db_shape['points'] = []

if db_shape.parent is None:
db_shape.elements = []
Expand Down Expand Up @@ -649,9 +651,11 @@ def _init_tracks_from_db(self):
default_attribute_values = self.db_attributes[db_track.label_id]["mutable"].values()
for db_shape in db_track["shapes"]:
db_shape["attributes"] = list(set(db_shape["attributes"]))
# in case of trackedshapes need to interpolate attriute values and extend it
# in case of trackedshapes need to interpolate attribute values and extend it
# by previous shape attribute values (not default values)
self._extend_attributes(db_shape["attributes"], default_attribute_values)
if db_shape['type'] == str(models.ShapeType.SKELETON):
db_shape['points'] = []
default_attribute_values = db_shape["attributes"]

if db_track.parent is None:
Expand Down
Loading