Spaces:
Runtime error
Runtime error
File size: 987 Bytes
5d756f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
from dp2.anonymizer import Anonymizer
from dp2.detection.person_detector import CSEPersonDetector
from ..defaults import common
from tops.config import LazyCall as L
from dp2.generator.dummy_generators import MaskOutGenerator
maskout_G = L(MaskOutGenerator)(noise="constant")
detector = L(CSEPersonDetector)(
mask_rcnn_cfg=dict(),
cse_cfg=dict(),
cse_post_process_cfg=dict(
target_imsize=(288, 160),
exp_bbox_cfg=dict(percentage_background=0.3, axis_minimum_expansion=.1),
exp_bbox_filter=dict(minimum_area=32*32, min_bbox_ratio_inside=0, aspect_ratio_range=[0, 99999]),
iou_combine_threshold=0.4,
dilation_percentage=0.02,
normalize_embedding=False
),
score_threshold=0.3,
cache_directory=common.output_dir.joinpath("cse_person_detection_cache")
)
anonymizer = L(Anonymizer)(
detector="${detector}",
person_G_cfg="configs/fdh/styleganL_nocse.py",
cse_person_G_cfg="configs/fdh/styleganL.py",
)
|