Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

config.py 2.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import os
  2. class PARAMS(object):
  3. #change this pycharme-'../' ,cmd = './'
  4. _CMD_PMT_ = './' # '../'
  5. #Object Detection
  6. _YOLOV3_OD_WEIGHT = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_object_detection/yolov3.weights')
  7. _YOLOV3_OD_MODEL_CFG = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_object_detection/yolov3.cfg')
  8. _YOLOV3_OD_CLASS_NAMES = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_object_detection/coco-labels')
  9. _YOLOV3_OD_CONFIDENCE = 0.5
  10. _YOLOV3_OD_THRESHOLD = 0.3
  11. _YOLOV3_OD_INPUT_IMAGE_SIZE = (416,416) #(Width, Height)
  12. #_YOLOV3_OD_NUMBER_PLATE_OBJECT_LIST = ['car','bus','truck','motorbike']
  13. _YOLOV3_OD_NUMBER_PLATE_OBJECT_LIST = ['car']
  14. # Number Plate Detection
  15. _YOLOV3_NP_WEIGHT = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_number_plate_detection/lapi.weights')
  16. _YOLOV3_NP_MODEL_CFG = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_number_plate_detection/darknet-yolov3.cfg')
  17. _YOLOV3_NP_CLASS_NAMES = os.path.join(_CMD_PMT_,'resources/trainedModels/yolov3_number_plate_detection/classes.names')
  18. _YOLOV3_NP_CONFIDENCE = 0.5
  19. _YOLOV3_NP_THRESHOLD = 0.4
  20. _YOLOV3_NP_INPUT_IMAGE_SIZE_DEFAULT = (608, 608) ##(Width, Height)
  21. _YOLOV3_NP_INPUT_IMAGE_SIZE_CONFIG1 = (256, 128) #(Width, Height)
  22. _YOLOV3_NP_INPUT_IMAGE_SIZE_CONFIG2 = (256, 256) #(Width, Height)
  23. #Lane Direction
  24. _TRAFFIC_DIRECTION = 'H-Increasing' #Decreasing' #H-Increasing
  25. # _TRAFFIC_DIRECTION = 'H-Decreasing' #Decreasing' #H-Increasing
  26. _ASSIGN_DIRECTION_HEIGHT_PERCENT = 0.20
  27. _DECIDE_DIRECTION_AFTER_FRAMES_TRACKERING = 5
  28. _DIRECTION_STRING_WRONG = 'Opposite Direction'
  29. _DIRECTION_STRING_RIGHT = 'Right Direction'
  30. _CAMERA_IMAGE_ORIGIN = 'H00' #H11 #H00- origing is top left corner
  31. _START_TRCAKER_MARGIN_PERCENT_HEIGHT = 0.15
  32. _NUM_FRAME_TRACKER_ALIVE_AFTER_MISS = 3
  33. #_TRACKER_OBJECT_LIST = ['car', 'bus', 'truck', 'motorbike']#'person']
  34. _TRACKER_OBJECT_LIST = ['car']#'person']
  35. #no-parking
  36. _NO_PARAKING_LINE_POINT_1_XY = (340,1080)
  37. _NO_PARAKING_LINE_POINT_2_XY = (1225,0)
  38. _NO_PARAKING_SIDE_OF_LINE = 'RIGHT'
  39. _PARKING_STRING = 'WRONG PARKING'
  40. #Algo mode
  41. _ALGO_MODE_PARKING = False
  42. _ALGO_MODE_NUMBER_PLATE = True
  43. _ALGO_MODE_KALMAN_TRCAKING = True
  44. #logo
  45. LOGO_FILE_PATH = os.path.join(_CMD_PMT_,'resources/logo.png')
  46. #Sharable variables MAX_SIZES
  47. _MAX_INPUT_QUEUE_SIZE = 50
  48. _MAX_VEHICLE_DETECTION_QUEUE_SIZE = 50
  49. _MAX_OUTPUT_QUEUE_SIZE = 50