You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

helmet_detection.yaml 2.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. apiVersion: sedna.io/v1alpha1
  2. kind: IncrementalLearningJob
  3. metadata:
  4. name: helmet-detection-demo
  5. spec:
  6. initialModel:
  7. name: "initial-model"
  8. dataset:
  9. name: "incremental-dataset"
  10. trainProb: 0.8
  11. trainSpec:
  12. template:
  13. spec:
  14. nodeName: $WORKER_NODE
  15. containers:
  16. - image: $IMAGE
  17. name: train-worker
  18. imagePullPolicy: IfNotPresent
  19. args: [ "train.py" ]
  20. env:
  21. - name: "batch_size"
  22. value: "32"
  23. - name: "epochs"
  24. value: "1"
  25. - name: "input_shape"
  26. value: "352,640"
  27. - name: "class_names"
  28. value: "person,helmet,helmet-on,helmet-off"
  29. - name: "nms_threshold"
  30. value: "0.4"
  31. - name: "obj_threshold"
  32. value: "0.3"
  33. trigger:
  34. checkPeriodSeconds: 60
  35. timer:
  36. start: 02:00
  37. end: 20:00
  38. condition:
  39. operator: ">"
  40. threshold: 500
  41. metric: num_of_samples
  42. evalSpec:
  43. template:
  44. spec:
  45. nodeName: $WORKER_NODE
  46. containers:
  47. - image: $IMAGE
  48. name: eval-worker
  49. imagePullPolicy: IfNotPresent
  50. args: [ "eval.py" ]
  51. env:
  52. - name: "input_shape"
  53. value: "352,640"
  54. - name: "class_names"
  55. value: "person,helmet,helmet-on,helmet-off"
  56. deploySpec:
  57. model:
  58. name: "deploy-model"
  59. hotUpdateEnabled: true
  60. pollPeriodSeconds: 60
  61. trigger:
  62. condition:
  63. operator: ">"
  64. threshold: 0.1
  65. metric: precision_delta
  66. hardExampleMining:
  67. name: "IBT"
  68. parameters:
  69. - key: "threshold_img"
  70. value: "0.9"
  71. - key: "threshold_box"
  72. value: "0.9"
  73. template:
  74. spec:
  75. nodeName: $WORKER_NODE
  76. containers:
  77. - image: $IMAGE
  78. name: infer-worker
  79. imagePullPolicy: IfNotPresent
  80. args: [ "inference.py" ]
  81. env:
  82. - name: "input_shape"
  83. value: "352,640"
  84. - name: "video_url"
  85. value: "file://video/video.mp4"
  86. - name: "HE_SAVED_URL"
  87. value: "/he_saved_url"
  88. volumeMounts:
  89. - name: localvideo
  90. mountPath: /video/
  91. - name: hedir
  92. mountPath: /he_saved_url
  93. resources: # user defined resources
  94. limits:
  95. memory: 2Gi
  96. volumes: # user defined volumes
  97. - name: localvideo
  98. hostPath:
  99. path: /incremental_learning/video/
  100. type: DirectoryOrCreate
  101. - name: hedir
  102. hostPath:
  103. path: /incremental_learning/he/
  104. type: DirectoryOrCreate
  105. outputDir: "/output"