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

Error with get_data(input_path) function of simple_parser.py #100

Open
sindhura234 opened this issue Nov 27, 2020 · 3 comments
Open

Error with get_data(input_path) function of simple_parser.py #100

sindhura234 opened this issue Nov 27, 2020 · 3 comments

Comments

@sindhura234
Copy link

https://github.com/kbardool/keras-frcnn/blob/cf9685b515695d15ee7688ef81959db171cc0ee2/train_frcnn.py#L84

image

Im getting the above error when i tried training with training_frcnn.py.
Did anyone face the same issue? please help me how to deal this

@Triazic
Copy link

Triazic commented Jan 11, 2021

it's a plain ol' code error... line 4 of simple_parser/py only accepts one argument but train_frcnn.py gives 2. I just deleted the second argument. clearly no-one has tested that this code runs.

@NemesisIrae
Copy link

@Triazic It works ok, but wouldn't it be a mistake? The original lines were:
train_imgs, classes_count, class_mapping = get_data(options.train_path, 'trainval') val_imgs, _, _ = get_data(options.train_path, 'test')

Without the second argument, the information about training and validation sets is lost:
train_imgs, classes_count, class_mapping = get_data(options.train_path) val_imgs, _, _ = get_data(options.train_path)

Now get_data loads the same data twice - data for training and validation is the same data!
I think that get_data used to split the training set 'under the hood' and now it doeasn't so we need to pass the training and validation set explicitly through option, eg:
parser.add_option("-p", "--path", dest="train_path", help="Path to training data.") parser.add_option("-v", "--val-path", dest="val_path", help="Path to validation data.")

And use them in get_data now:
train_imgs, classes_count, class_mapping = get_data(options.train_path) val_imgs, _, _ = get_data(options.val_path)

I might have misunderstood something but I think it's the way to go. Still, it's not nice to leave the code broken like this in the repository :/

@Triazic
Copy link

Triazic commented Apr 4, 2021

No idea, I'd already moved on to detectron2 by the time I commented, or shortly after.
I tried many of the similar python repos to this one and they were all bugged in some way or I couldn't get them to run due to old packaging issues.
My suggestion is to not try and fix other people's code (python, especially)... find something that works correctly out of the box.. who knows what else is wrong.

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

3 participants