落水人员检测
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1KB

  1. # from tracker import update_tracker
  2. import cv2
  3. class baseDet(object):
  4. def __init__(self):
  5. self.img_size = 640
  6. self.threshold = 0.3
  7. self.stride = 1
  8. # self.dete_weights=''
  9. def build_config(self):
  10. self.faceTracker = {}
  11. self.faceClasses = {}
  12. self.faceLocation1 = {}
  13. self.faceLocation2 = {}
  14. self.frameCounter = 0
  15. self.currentCarID = 0
  16. self.recorded = []
  17. self.font = cv2.FONT_HERSHEY_SIMPLEX
  18. def feedCap(self, im):
  19. retDict = {
  20. 'frame': None,
  21. 'faces': None,
  22. 'list_of_ids': None,
  23. 'face_bboxes': []
  24. }
  25. self.frameCounter += 1
  26. # im, faces, face_bboxes = update_tracker(self, im)
  27. retDict['frame'] = im
  28. # retDict['faces'] = faces
  29. # retDict['face_bboxes'] = face_bboxes
  30. return retDict
  31. def init_model(self):
  32. raise EOFError("Undefined model type.")
  33. def preprocess(self):
  34. raise EOFError("Undefined model type.")
  35. def detect(self):
  36. raise EOFError("Undefined model type.")