rein0421 commited on
Commit
d1abab4
·
verified ·
1 Parent(s): ebd489e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -207,14 +207,14 @@ from ultralytics import YOLO
207
 
208
  # オブジェクト選択を動的に行う関数
209
  def decide_to_object(risk_level):
210
- tex = [
211
- 'text', 'poster','Name tag','License plate', 'digital screens',
212
- 'signboard','sign', 'logo', 'manhole', 'electricity pole','cardboard'
213
  ]
214
- # この配列の要素の順番を変えると消える順番が変わる。
215
  risk_level = int(risk_level / 20) * (len(tex) / 5) # 個数決定(1/2)
216
  return tex[:int(risk_level) + 1]
217
 
 
218
  # マスクを生成する関数
219
  def create_mask(image, x1, y1, x2, y2):
220
  mask = np.zeros((image.shape[0], image.shape[1]), dtype=np.uint8)
 
207
 
208
  # オブジェクト選択を動的に行う関数
209
  def decide_to_object(risk_level):
210
+ tex = [
211
+ 'text', 'poster', 'Name tag', 'License plate', 'digital screens',
212
+ 'signboard', 'sign', 'logo', 'manhole', 'electricity pole', 'cardboard'
213
  ]
 
214
  risk_level = int(risk_level / 20) * (len(tex) / 5) # 個数決定(1/2)
215
  return tex[:int(risk_level) + 1]
216
 
217
+
218
  # マスクを生成する関数
219
  def create_mask(image, x1, y1, x2, y2):
220
  mask = np.zeros((image.shape[0], image.shape[1]), dtype=np.uint8)