justadudewhohacks / tfjs-tiny-yolov2

Tiny YOLO v2 object detection with tensorflow.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

different layer names but still tiny yolov2

espinarob opened this issue · comments

I have a pre trained model with weights .json file containing the code block below. Would this suffice to load using the library? I hope you can guide me through this, very much appreciated.

[
  {
    "paths": [
      "group1-shard1of16",
      "group1-shard2of16",
      "group1-shard3of16",
      "group1-shard4of16",
      "group1-shard5of16",
      "group1-shard6of16",
      "group1-shard7of16",
      "group1-shard8of16",
      "group1-shard9of16",
      "group1-shard10of16",
      "group1-shard11of16",
      "group1-shard12of16",
      "group1-shard13of16",
      "group1-shard14of16",
      "group1-shard15of16",
      "group1-shard16of16"
    ],
    "weights": [
      { "name": "Pad/paddings", "shape": [4, 2], "dtype": "int32" },
      {
        "name": "0-convolutional/filter",
        "shape": [3, 3, 3, 16],
        "dtype": "float32"
      },
      { "name": "sub/y", "shape": [16], "dtype": "float32" },
      { "name": "truediv", "shape": [16], "dtype": "float32" },
      { "name": "BiasAdd/bias", "shape": [16], "dtype": "float32" },
      { "name": "mul_1/x", "shape": [], "dtype": "float32" },
      {
        "name": "3-convolutional/filter",
        "shape": [3, 3, 16, 32],
        "dtype": "float32"
      },
      { "name": "sub_1/y", "shape": [32], "dtype": "float32" },
      { "name": "truediv_1", "shape": [32], "dtype": "float32" },
      { "name": "BiasAdd_1/bias", "shape": [32], "dtype": "float32" },
      {
        "name": "6-convolutional/filter",
        "shape": [3, 3, 32, 64],
        "dtype": "float32"
      },
      { "name": "sub_2/y", "shape": [64], "dtype": "float32" },
      { "name": "truediv_2", "shape": [64], "dtype": "float32" },
      { "name": "BiasAdd_2/bias", "shape": [64], "dtype": "float32" },
      {
        "name": "9-convolutional/filter",
        "shape": [3, 3, 64, 128],
        "dtype": "float32"
      },
      { "name": "sub_3/y", "shape": [128], "dtype": "float32" },
      { "name": "truediv_3", "shape": [128], "dtype": "float32" },
      { "name": "BiasAdd_3/bias", "shape": [128], "dtype": "float32" },
      {
        "name": "12-convolutional/filter",
        "shape": [3, 3, 128, 256],
        "dtype": "float32"
      },
      { "name": "sub_4/y", "shape": [256], "dtype": "float32" },
      { "name": "truediv_4", "shape": [256], "dtype": "float32" },
      { "name": "BiasAdd_4/bias", "shape": [256], "dtype": "float32" },
      {
        "name": "15-convolutional/filter",
        "shape": [3, 3, 256, 512],
        "dtype": "float32"
      },
      { "name": "sub_5/y", "shape": [512], "dtype": "float32" },
      { "name": "truediv_5", "shape": [512], "dtype": "float32" },
      { "name": "BiasAdd_5/bias", "shape": [512], "dtype": "float32" },
      {
        "name": "18-convolutional/filter",
        "shape": [3, 3, 512, 1024],
        "dtype": "float32"
      },
      { "name": "sub_6/y", "shape": [1024], "dtype": "float32" },
      { "name": "truediv_6", "shape": [1024], "dtype": "float32" },
      { "name": "BiasAdd_6/bias", "shape": [1024], "dtype": "float32" },
      {
        "name": "20-convolutional/filter",
        "shape": [3, 3, 1024, 1024],
        "dtype": "float32"
      },
      { "name": "sub_7/y", "shape": [1024], "dtype": "float32" },
      { "name": "truediv_7", "shape": [1024], "dtype": "float32" },
      { "name": "BiasAdd_7/bias", "shape": [1024], "dtype": "float32" },
      {
        "name": "22-convolutional/filter",
        "shape": [1, 1, 1024, 35],
        "dtype": "float32"
      },
      { "name": "BiasAdd_8/bias", "shape": [35], "dtype": "float32" }
    ]
  }
]