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

Config.json reformatting #11

Open
snowsignal opened this issue Nov 22, 2017 · 1 comment
Open

Config.json reformatting #11

snowsignal opened this issue Nov 22, 2017 · 1 comment
Assignees

Comments

@snowsignal
Copy link
Contributor

I think that we should change some aspects of config.json parsing. First of all, we should add a new value, 'predict', in the main JSON object, which will contain "weight", and "images" sub-properties. We also should add a 'production' value, which contains "timeout" and "tmplocation" sub-properties. Here's a potential example of what it could look like:

{
  "model" : {
    "architecture": "Tiny Yolo",
    "input_size": 416,
    "anchors": [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828],
    "max_box_per_image": 3,
    "labels": ["bucket"]
  },

  "train": {
    "train_image_folder": "/scratch/coe_andrew/bucket/bucket-dataset/images/",
    "train_annot_folder": "/scratch/coe_andrew/bucket/bucket-dataset/annotations/",

    "train_times": 15,
    "pretrained_weights": "",
    "batch_size": 24,
    "learning_rate": 1e-5,
    "nb_epoch": 50,
    "warmup_batches": 250,

    "object_scale": 5.0 ,
    "no_object_scale": 1.0,
    "coord_scale": 1.0,
    "class_scale": 1.0,

    "saved_weights_name": "save_tiny.h5",
    "debug": true
  },

  "valid": {
    "valid_image_folder": "",
    "valid_annot_folder": "",

    "valid_times": 1
  },
  "predict": {
    "weight": "data/dataset.h5",
    "images": [
      "images/test.jpg",
      "images/test2.jpg"
    ]
  },
  "production" : {
    "timeout" : 5,
    "tmplocation" : "tmp/",
    "weight" : "data/dataset.h5"
  }
}

The "weight" property determines what weight file to use when testing, if one is not specified in the command lines. "images" contains a test batch of images to run the predict function on. In the "production" object, "timeout" is the maximum processing time for an image in the processing queue (in seconds), "tmplocation" is the location to write out video camera input to (and to read from), and "weight" specifies the weight file to use.

I think that this should probably be done before we actually start working on the camera reading - or "production" script.

This would involve doing some rewriting on the predict.py script, and I think that we should work on seperating the CLI parsing from predict.py before we start working on it.

@snowsignal
Copy link
Contributor Author

I'm going to go ahead and start working on this.

@snowsignal snowsignal self-assigned this Nov 22, 2017
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