MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / split_GT

Function split_GT

utils/cod10k_subclass_split.py:5–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def split_GT():
6 src_root = ''
7 dst_root = ''
8
9 for img_name in os.listdir(src_root):
10 sub_class = img_name.split('-')[3]
11
12 src_img_path = os.path.join(src_root, img_name)
13 dst_img_path = os.path.join(dst_root, 'COD10K-'+sub_class, "GT", img_name)
14 os.makedirs(os.path.join(dst_root, 'COD10K-'+sub_class, "GT"), exist_ok=True)
15
16 shutil.copyfile(src_img_path, dst_img_path)
17
18
19def split_pred():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected