Use frozenset() (#18785)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
fb3e5adfd7
commit
9341c1df76
5 changed files with 143 additions and 131 deletions
|
|
@ -407,7 +407,7 @@ class Instances:
|
|||
|
||||
cat_boxes = np.concatenate([ins.bboxes for ins in instances_list], axis=axis)
|
||||
seg_len = [b.segments.shape[1] for b in instances_list]
|
||||
if len(set(seg_len)) > 1: # resample segments if there's different length
|
||||
if len(frozenset(seg_len)) > 1: # resample segments if there's different length
|
||||
max_len = max(seg_len)
|
||||
cat_segments = np.concatenate(
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue