Skip to content
Kazuki Kyakuno edited this page Oct 29, 2020 · 3 revisions

netronではurlパラメータで外部のprototxtを読み込むことができます。

https://lutzroeder.github.io/netron/?url=https://storage.googleapis.com/ailia-models/lightweight-human-pose-estimation/lightweight-human-pose-estimation.opt.onnx.prototxt

prototxtはXMLHttpRequestで読み込まれるため、CORSをGCSのBucketに設定する必要があります。

gsutil cors set cors-json-file.json gs://ailia-models

cors-json-file.jsonの中身は下記になります。

[
    {
      "origin": ["https://lutzroeder.github.io"],
      "responseHeader": ["Content-Type"],
      "method": ["GET", "HEAD", "DELETE"],
      "maxAgeSeconds": 3600
    },
    {
      "origin": ["https://netron.app"],
      "responseHeader": ["Content-Type"],
      "method": ["GET", "HEAD", "DELETE"],
      "maxAgeSeconds": 3600
    }  
]

https://cloud.google.com/storage/docs/configuring-cors?hl=ja