def transform_seq(in_path,out_path,extractor): imgs_seq= imgs.make_imgs(in_path,norm=True) #imgs.read_images(in_path) print(str(extractor)) seq=[extractor(img_i) for img_i in imgs_seq] seq=[ seq_i.flatten() for seq_i in seq if seq_i!=None] txt=files.seq_to_string(seq) print(str(in_path)) print(str(out_path)) files.save_string(str(out_path)+'.txt',txt)
def save_features(out_path,feat_dict): text_dict=files.dict_to_txt(feat_dict) files.save_string(out_path,text_dict)