dotrack haved modified!

This commit is contained in:
王庆刚
2024-05-29 20:31:28 +08:00
parent dff029de20
commit d1ea304491
19 changed files with 379 additions and 149 deletions

View File

@ -12,12 +12,10 @@ from .dotracks import MoveState, Track
class frontTrack(Track):
# boxes: [x1, y1, x2, y2, track_id, score, cls, frame_index, box_index]
# 0, 1, 2, 3, 4, 5, 6, 7, 8
def __init__(self, boxes, imgshape=(1024, 1280)):
super().__init__(boxes, imgshape)
self.hands = []
def __init__(self, boxes, features, imgshape=(1024, 1280)):
super().__init__(boxes, features, imgshape)
'''5个关键点中心点、左上点、右上点、左下点、右下点 )轨迹特征'''
# self.compute_cornpts_feats()
@ -40,6 +38,7 @@ class frontTrack(Track):
'''该函数依赖项: self.isCornpoint不能在父类中初始化'''
self.trajfeature()
self.PositionState(camerType="front")
'''手部状态分析'''
self.HAND_STATIC_THRESH = 100
@ -245,7 +244,7 @@ class frontTrack(Track):
'''情况2中心点向上 '''
## 商品中心点向上移动但没有关联的Hand轨迹也不是左右边界点
condt_b = condt0 and len(self.hands)==0 and y0[-1] < y0[0] and (not self.is_edge_cornpoint())
condt_b = condt0 and len(self.Hands)==0 and y0[-1] < y0[0] and (not self.is_edge_cornpoint())
'''情况3: 商品在购物车内,但运动方向无序'''