Merge branch 'develop' into bs/bitmap
commit
c49a0c19fe
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2020 Intel Corporation
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
const UNDEFINED_ATTRIBUTE_VALUE = '__undefined__';
|
||||||
|
const NO_BREAK_SPACE = '\u00a0';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
UNDEFINED_ATTRIBUTE_VALUE,
|
||||||
|
NO_BREAK_SPACE,
|
||||||
|
};
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
# Copyright (C) 2020 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
from cvat.apps.engine.data_manager import TrackManager
|
||||||
|
|
||||||
|
from unittest import TestCase
|
||||||
|
|
||||||
|
|
||||||
|
class TrackManagerTest(TestCase):
|
||||||
|
def test_single_point_interpolation(self):
|
||||||
|
track = {
|
||||||
|
"frame": 0,
|
||||||
|
"label_id": 0,
|
||||||
|
"group": None,
|
||||||
|
"attributes": [],
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"frame": 0,
|
||||||
|
"points": [1.0, 2.0],
|
||||||
|
"type": "points",
|
||||||
|
"occluded": False,
|
||||||
|
"outside": False,
|
||||||
|
"attributes": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"frame": 2,
|
||||||
|
"attributes": [],
|
||||||
|
"points": [3.0, 4.0, 5.0, 6.0],
|
||||||
|
"type": "points",
|
||||||
|
"occluded": False,
|
||||||
|
"outside": True
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolated = TrackManager.get_interpolated_shapes(track, 0, 2)
|
||||||
|
|
||||||
|
self.assertEqual(len(interpolated), 3)
|
||||||
Loading…
Reference in New Issue