Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of base_dir #59

Open
velastin opened this issue Jan 14, 2020 · 0 comments
Open

use of base_dir #59

velastin opened this issue Jan 14, 2020 · 0 comments

Comments

@velastin
Copy link

I am not sure I am doing something wrong. I am checking if I can train with the data on a different location. I have everything (images, annotations, ...) in subdirectories of a new directory MyResNetEM. I then execute the following

python -u object_detector_retinanet/keras_retinanet/bin/train.py --gpu 0 --tensorboard-dir MyResNetEM/logs --snapshot-path MyResNetEM/snapshot csv --base_dir MyResNetEM/JPEGImages --annotations MyResNetEM/EMARetNetEM-annotations_train.csv --val-annotations MyResNetEM/EMARetNetEM-annotations_val.csv

I get an error that I traced to order.sort(key=lambda x: self.image_aspect_ratio(x)) in generator.py. image_aspect_ratio() is in csv_generator.py. It calls image_path() also in csv_generator.py

image_path() returns os.path.join(self.base_dir, self.image_names[image_index])

but I found that the elements of image_names[ ] already contain the base_dir, so image_path adds a second unnecessary base_dir resulting in the failure ...

I have modified image_path to simply return the appropriate element of image_names [ ]
The scripts seems to be happy now (training), but I am concerned this could have introduced another problem.

Comments welcome ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant