AIWintermuteAI / aXeleRate

Keras-based framework for AI on the Edge
MIT License
176 stars 71 forks source link

Weights issue #3

Closed THuffam closed 4 years ago

THuffam commented 4 years ago

Hi Not sure if this is the same as the previous issue.....

When running the Colab Detector sample code against my own images I get the following error:

`Project folder detector already exists. Creating a folder for new training session. Tflite Converter ready K210 Converter ready ['shark', 'dolphin', 'surfer', 'swimmer', 'bird', 'boogieboarder', 'boat', 'jetski', 'whale']

KeyError Traceback (most recent call last)

in () ----> 1 model_path = setup_training(config_dict=config) 1 frames /content/aXeleRate/axelerate/train.py in train_from_config(config, project_folder) 114 115 # 2. Load the pretrained weights (if any) --> 116 yolo.load_weights(config['weights']['full'], by_name=True) 117 118 # 3. actual training KeyError: 'weights'` I get the same error whether using MobileNet7_5, Tiny Yolo and Full Yolo. Any suggestions? Thanks Tim Config as follows: `config = { "model":{ "type": "Detector", "architecture": "MobileNet7_5", "input_size": 224, "anchors": [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828], "labels": ["shark","dolphin","surfer","swimmer","bird","boogieboarder","boat","jetski","whale"], "coord_scale" : 1.0, "class_scale" : 1.0, "object_scale" : 5.0, "no_object_scale" : 1.0 }, "pretrained" : { "full": "" }, "train" : { "actual_epoch": 5, "train_image_folder": "testtraining/train_imgs", "train_annot_folder": "testtraining/train_anns", "train_times": 4, "valid_image_folder": "testtraining/validation_imgs", "valid_annot_folder": "testtraining/validation_anns", "valid_times": 4, "batch_size": 4, "learning_rate": 1e-4, "saved_folder": "detector", "first_trainable_layer": "", "augumentation": True, "is_only_detect" : False }, "converter" : { "type": ["k210","tflite"] } }`
THuffam commented 4 years ago

Aha I see the problem... It is using newer code and I'm using the old colab sample which does not have the updated config items.

AIWintermuteAI commented 4 years ago

Yes. I am trying to avoid breaking changes in config, but sometimes they are necessary. I added "valid_metric" parameter this time and also weight configuration for feature extractor(this one is not implemented yet, but will be implemented in near future)