Skip to content
Snippets Groups Projects
Commit f407f89f authored by Stephane Chavin's avatar Stephane Chavin
Browse files

correction rsplit

parent dc6e078b
No related branches found
No related tags found
No related merge requests found
...@@ -88,15 +88,14 @@ def export_split(entry, path, directory): ...@@ -88,15 +88,14 @@ def export_split(entry, path, directory):
if args.test == 1: if args.test == 1:
test = entry[2] test = entry[2]
import ipdb;ipdb.set_trace() test.file = test.file.str.rsplit('.').str[0]
test.file = test.file.str.rsplit('.', 1).str[0]
create_directory_if_not_exists(os.path.join(directory, 'images/test')) create_directory_if_not_exists(os.path.join(directory, 'images/test'))
create_directory_if_not_exists(os.path.join(directory, 'labels/test')) create_directory_if_not_exists(os.path.join(directory, 'labels/test'))
copy_files_to_directory(test.file, path, os.path.join(directory, 'labels/test'), 'txt') copy_files_to_directory(test.file, path, os.path.join(directory, 'labels/test'), 'txt')
copy_files_to_directory(test.file, os.path.join(path, '../images/all'), os.path.join(directory, 'images/test'), 'jpg') copy_files_to_directory(test.file, os.path.join(path, '../images/all'), os.path.join(directory, 'images/test'), 'jpg')
val.file = val.file.str.rsplit('.', 1).str[0] val.file = val.file.str.rsplit('.').str[0]
train.file = train.file.str.rsplit('.', 1).str[0] train.file = train.file.str.rsplit('.').str[0]
create_directory_if_not_exists(os.path.join(directory, 'images/train')) create_directory_if_not_exists(os.path.join(directory, 'images/train'))
create_directory_if_not_exists(os.path.join(directory, 'images/val')) create_directory_if_not_exists(os.path.join(directory, 'images/val'))
create_directory_if_not_exists(os.path.join(directory, 'labels/train')) create_directory_if_not_exists(os.path.join(directory, 'labels/train'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment