MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / parsePaths

Function parsePaths

data/preprocess_iharmony4.py:6–12  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

4import argparse
5
6def parsePaths(path):
7 name_parts=path.split('_')
8 mask_path = path.replace('composite_images','masks')
9 mask_path = mask_path.replace(('_'+name_parts[-1]),'.png')
10 target_path = path.replace('composite_images','real_images')
11 target_path = target_path.replace(('_'+name_parts[-2]+'_'+name_parts[-1]),'.jpg')
12 return path, mask_path, target_path
13
14if __name__ == '__main__':
15 parser = argparse.ArgumentParser()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected