added separate dict_pics function for changing target training images url on the fly
This commit is contained in:
parent
2f3df22c4a
commit
b349d2f07a
@ -404,13 +404,18 @@ class PreProcessing:
|
||||
splits, etc.
|
||||
'''
|
||||
|
||||
def stt_training(self, dict_pics, expanded_class, expanded_dropd):
|
||||
def stt_training(self):
|
||||
'''
|
||||
Source to target training. Replaces source image URL with target URL
|
||||
determined by values in dict_pics variable.
|
||||
'''
|
||||
|
||||
pass
|
||||
target_dir = os.getcwd()
|
||||
with open('temp_pics_source_list.txt') as f:
|
||||
temp_pics_source_list = json.load(f)
|
||||
temp_dict_pics = {k:target_dir + os.sep + re.search(r'[^/]+(?=/\$_|.jpg)', k, re.IGNORECASE).group() + '.jpg' for k in temp_pics_source_list}
|
||||
print("{source:target} dictionary created @ " + os.getcwd() + os.sep + 'training_images')
|
||||
return temp_dict_pics
|
||||
|
||||
# TODO pipeline gameplan: 5 files: dict_pics.txt,raw_json.txt, raw_json.csv, expanded_class.csv, expanded_dropd.csv
|
||||
# cont... open raw_json.txt and append, same with csv --> process new data --> pull out image source+dest and expand new dfs for the additional pictures
|
||||
|
Loading…
Reference in New Issue
Block a user