serialbandicoot/playwright-classification

feature: Using the model url as a reference as well as path

Opened this issue · 0 comments

As a reference it looks like the model can also use an http:// path as well as file:// tensorflow/tfjs#410

  1. Change the meta object object to be more descriptive. file should probably be modelJson and model would be more accurate as classificationType

  2. Allow an http modelJson reference.

metadata: {
  models: [{
    image: {
      type: "binary",
      modelJson: "./cnn/model_output/binary/model.json", 
      classes: [
        "nofive",
        "five"
      ],
      dimensions: {
        width: 28,
        height: 28
      }
    }
  }, {
    image: {
      type: "category",
      modelJson: "https://my-site.com/cnn/model_output/category/model.json", 
      classes: [
        "four",
        "nine",
        "two"
      ],
      dimensions: {
        width: 28,
        height: 28
      }
    }
  }]
}```