Fucius commited on
Commit
f7cecee
1 Parent(s): 3733fd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -456,13 +456,13 @@ def main(device, segment_type):
456
 
457
  controller.reset()
458
  if pipe.tokenizer("man")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
459
- mask1 = predict_mask(detect_model, sam, image[0], 'man', args.segment_type, confidence=0.15,
460
  threshold=0.5)
461
  else:
462
  mask1 = None
463
 
464
  if pipe.tokenizer("woman")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
465
- mask2 = predict_mask(detect_model, sam, image[0], 'woman', args.segment_type, confidence=0.15,
466
  threshold=0.5)
467
  else:
468
  mask2 = None
 
456
 
457
  controller.reset()
458
  if pipe.tokenizer("man")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
459
+ mask1 = predict_mask(detect_model, sam, image[0], 'man', args.segment_type, confidence=0.10,
460
  threshold=0.5)
461
  else:
462
  mask1 = None
463
 
464
  if pipe.tokenizer("woman")["input_ids"][1] in pipe.tokenizer(args.prompt)["input_ids"][1:-1]:
465
+ mask2 = predict_mask(detect_model, sam, image[0], 'woman', args.segment_type, confidence=0.10,
466
  threshold=0.5)
467
  else:
468
  mask2 = None