Closed kmanojkkmr closed 4 years ago
Did you pass your new config.ini while converting your model from training to inference? See #1233
Thanks for the headup. :) @Gateway2745 I have passed the config parameters to models.convert_model(models, anchor_params). Now i am able to get the expected result.
Changes I have made: Before Change: model = models.load_model(model_path, backbone_name='resnet50') model = models.convert_model(model)
After Changes:
model = models.load_model(model_path, backbone_name='resnet50') config_file = r'config.ini' anchor_parameters = None if config_file: config_file = read_config_file(config_file) if 'anchor_parameters' in config_file: anchor_parameters = parse_anchor_parameters(config_file)
model = models.convert_model(model, anchor_params=anchor_parameters)
Run the below code in the terminal python keras_retinanet/bin/train.py --weights ./snapshots/resnet50_csv_10.h5 --config config.ini --freeze-backbone --random-transform --batch-size 8 --steps 1 --epochs 1 csv train.csv classes.csv
Hope this helps to someone who wants to make changes for prediction.
When I changed ratios to 5 values in Anchor parameters using config.ini file I am getting the below error while testing.
InvalidArgumentError Traceback (most recent call last)