-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.py
More file actions
30 lines (25 loc) · 833 Bytes
/
example.py
File metadata and controls
30 lines (25 loc) · 833 Bytes
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from scripts.occlusion_funcs import blobs
from scripts.occlusion_funcs import partial_viewing
from scripts.occlusion_funcs import deletion
input_dir = './input_images'
# If you want to apply only one manipulation type
blobs(input_dir, easy=10, hard=50, many_small=True)
deletion(input_dir, easy=40, hard=70, few_large=True, col=255)
partial_viewing(input_dir, easy=20, hard=50, many_small=False, few_large=True, seed=42)
# We can also use the more general occlude function that is called in occlude_images_folder.py
from scripts.occlusion_funcs import occlude
occlude(
input_dir,
easy=20,
hard=60,
apply_blobs=True,
apply_deletion=True,
apply_partialviewing=True,
many_small=True,
few_large=True,
col=0,
out_root="./outputs",
seed=42,
)