-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 bug: Error in Create project from backup for Standard 3D Annotation #4160
Changes from 6 commits
84c996a
903266a
1c8fde7
1d27a4a
c86d20b
1825702
0d43494
438fae7
86dc515
9250694
a94162a
7bbe94d
91cb86f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2021 Intel Corporation | ||
# Copyright (C) 2021-2022 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
@@ -324,7 +324,7 @@ def partial_update(self, manifest, number): | |
|
||
def __getitem__(self, number): | ||
assert 0 <= number < len(self), \ | ||
'A invalid index number: {}\nMax: {}'.format(number, len(self)) | ||
'Invalid index number: {}\nMax: {}'.format(number, len(self) - 1) | ||
return self._index[number] | ||
|
||
def __len__(self): | ||
|
@@ -706,12 +706,15 @@ def _validate_first_item(_dict): | |
raise ValueError('Incorrect name field') | ||
if not isinstance(_dict['extension'], str): | ||
raise ValueError('Incorrect extension field') | ||
# width and height are required for 2d data | ||
# FIXME for 3d when manual preparation of the manifest will be implemented | ||
if not isinstance(_dict['width'], int): | ||
raise ValueError('Incorrect width field') | ||
if not isinstance(_dict['height'], int): | ||
raise ValueError('Incorrect height field') | ||
# FIXME | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marishka17 , the same question. What are we going to do with the comment? It looks like we disable two checks which can be important for 2D case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nmanovic, yes, but these checks are only relevant for the first element of the manifest file, and the reliability will drop a bit... |
||
# Width and height are required for 2D data, but | ||
# for 3D these parameters are not saved now. | ||
# It is necessary to uncomment these restrictions when manual preparation for 3D data is implemented. | ||
|
||
# if not isinstance(_dict['width'], int): | ||
# raise ValueError('Incorrect width field') | ||
# if not isinstance(_dict['height'], int): | ||
# raise ValueError('Incorrect height field') | ||
|
||
def is_manifest(full_manifest_path): | ||
return _is_video_manifest(full_manifest_path) or \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marishka17 , what are we going to do with the comment?