// MIT License

// Copyright (c) 2019 kaiJIN

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#ifndef _LAMBDA_BENCHMARK_MODELS_TENGINE_FLOAT_H_
#define _LAMBDA_BENCHMARK_MODELS_TENGINE_FLOAT_H_

#include <unordered_map>
#include "lambda/lambda_struct.h"

namespace lambda {

std::unordered_map<std::string, TargetInfo> tengine_models_fp32 = {
  {
    "squeezenet_caffe",
    TargetInfo{
      .id = 0,
      .info = "squeezenet_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/squeezenet_v1.1.caffemodel",
      .define = "/caffe/sqz.prototxt",
      .graph = "squeezenet_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "mobilenet_caffe",
    TargetInfo{
      .id = 1,
      .info = "mobilenet_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/mobilenet.caffemodel",
      .define = "/caffe/mobilenet_deploy.prototxt",
      .graph = "mobilenet_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "mobilenet_v2_caffe",
    TargetInfo{
      .id = 2,
      .info = "mobilenet_v2_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/mobilenet_v2.caffemodel",
      .define = "/caffe/mobilenet_v2_deploy.prototxt",
      .graph = "mobilenet_v2_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "googlenet_caffe",
    TargetInfo{
      .id = 3,
      .info = "googlenet_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/googlenet.caffemodel",
      .define = "/caffe/googlenet.prototxt",
      .graph = "googlenet_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "resnet50_caffe",
    TargetInfo{
      .id = 4,
      .info = "resnet50_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/resnet50.caffemodel",
      .define = "/caffe/resnet50.prototxt",
      .graph = "resnet50_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "vgg16_caffe",
    TargetInfo{
      .id = 5,
      .info = "vgg16_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/vgg16.caffemodel",
      .define = "/caffe/vgg16.prototxt",
      .graph = "vgg16_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "alexnet_caffe",
    TargetInfo{
      .id = 6,
      .info = "alexnet_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/alexnet.caffemodel",
      .define = "/caffe/alex_deploy.prototxt",
      .graph = "alexnet_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 227,
          .w = 227,
        },
    },
  },
  {
    "yolo_v2_caffe",
    TargetInfo{
      .id = 7,
      .info = "yolo_v2_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/yolo_voc.caffemodel",
      .define = "/caffe/yolo_voc.prototxt",
      .graph = "yolo_v2_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 416,
          .w = 416,
        },
    },
  },
  {
    "mssd_caffe",
    TargetInfo{
      .id = 8,
      .info = "mssd",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/MobileNetSSD_deploy.caffemodel",
      .define = "/caffe/MobileNetSSD_deploy.prototxt",
      .graph = "mssd_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 300,
          .w = 300,
        },
    },
  },
  {
    "inception_v3_caffe",
    TargetInfo{
      .id = 9,
      .info = "inception_v3",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/deploy_inceptionV3.caffemodel",
      .define = "/caffe/deploy_inceptionV3.prototxt",
      .graph = "inception_v3_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 299,
          .w = 299,
        },
    },
  },
  {
    "inception_v4_caffe",
    TargetInfo{
      .id = 10,
      .info = "inception_v4_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/inception_v4.caffemodel",
      .define = "/caffe/inception_v4.prototxt",
      .graph = "inception_v4_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 299,
          .w = 299,
        },
    },
  },
  {
    "mobile_face_caffe",
    TargetInfo{
      .id = 11,
      .info = "mobile_face_caffe",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/caffe/model-77.caffemodel",
      .define = "/caffe/model-77.prototxt",
      .graph = "mobile_face_caffe",
      .platform = PlatformType::CAFFE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 112,
          .w = 112,
        },
    },
  },
  {
    "alexnet_lambda",
    TargetInfo{
      .id = 12,
      .info = "alexnet_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/alexnet.twb",
      .define = "",
      .graph = "alexnet_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "erfnet_lambda",
    TargetInfo{
      .id = 13,
      .info = "erfnet_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/erfnet.twb",
      .define = "",
      .graph = "erfnet_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 72,
          .w = 360,
        },
    },
  },
  {
    "mssd_lambda",
    TargetInfo{
      .id = 14,
      .info = "mssd_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/mssd.twb",
      .define = "",
      .graph = "mssd_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 216,
          .w = 384,
        },
    },
  },
  {
    "simplenet_lambda",
    TargetInfo{
      .id = 15,
      .info = "simplenet_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/simplenet.twb",
      .define = "",
      .graph = "simplenet_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 72,
          .w = 360,
        },
    },
  },
  {
    "openpilot_lanedet",
    TargetInfo{
      .id = 2,
      .info = "openpilot_lanedet",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/openpilot/mobilenet_v2.tmfile",
      .define = "/openpilot/mobilenet_v2.tmfile",
      .graph = "openpilot_lanedet",
      .platform = PlatformType::TENGINE,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "mobilenet_v2_lambda",
    TargetInfo{
      .id = 2,
      .info = "mobilenet_v2_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/mobilenet_v2.twb",
      .define = "",
      .graph = "mobilenet_v2_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 224,
          .w = 224,
        },
    },
  },
  {
    "signdet_lambda",
    TargetInfo{
      .id = 14,
      .info = "signdet_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/signdet.twb",
      .define = "",
      .graph = "signdet_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 288,
          .w = 512,
        },
    },
  },
  {
    "signfe_lambda",
    TargetInfo{
      .id = 15,
      .info = "signfe_lambda",
      .engine = EngineType::TENGINE,
      .device = DeviceType::CPU,
      .quant = QuantizedType::FLOAT,
      .weight = "/lambda/signfe.twb",
      .define = "",
      .graph = "signfe_lambda",
      .platform = PlatformType::LAMBDA,
      .inshape =
        {
          .n = 1,
          .c = 3,
          .h = 112,
          .w = 112,
        },
    },
  },
};
}
#endif