tensorflow.js:02.lobeで出力したモデルでpredict
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| tensorflow.js:02.lobeで出力したモデルでpredict [2021/01/09] – [見出し] adash333 | tensorflow.js:02.lobeで出力したモデルでpredict [2021/08/20] (現在) – [lobeの使い方 202108] adash333 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== | + | ====== |
| [[tensorflow.js: | [[tensorflow.js: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| ===== ソースコード ===== | ===== ソースコード ===== | ||
| 変更中 | 変更中 | ||
| https:// | https:// | ||
| + | ===== lobeの使い方 202108 ===== | ||
| + | |||
| + | |||
| + | https:// | ||
| + | 誰でもノーコードで画像判別の機械学習モデルを作成できる「Lobe」 | ||
| + | 清水 理史2021年4月12日 | ||
| + | |||
| + | https:// | ||
| + | →これを写経してみたい | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| ===== 流れ その1 ===== | ===== 流れ その1 ===== | ||
| 行 22: | 行 42: | ||
| ===== 流れ その2 ===== | ===== 流れ その2 ===== | ||
| + | https:// | ||
| + | |||
| + | https:// | ||
| https:// | https:// | ||
| + | |||
| + | https:// | ||
| -Lobeで出力したTensorFlow.js用のモデルのファイル群をGitHub Pagesで公開(デフォルトでCORS設定されている) | -Lobeで出力したTensorFlow.js用のモデルのファイル群をGitHub Pagesで公開(デフォルトでCORS設定されている) | ||
| - | - | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | async function main(imgPath: | ||
| + | |||
| + | // run the prediction | ||
| + | const results = model.predict(decodedImage); | ||
| + | console.log(results); | ||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | const imgPath = " | ||
| + | main(imgPath); | ||
| + | |||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| ===== TensorFlow.jsでpredict ===== | ===== TensorFlow.jsでpredict ===== | ||
| + | |||
| + | https:// | ||
| + | Microsoft Lobeが便利!写真の分類を簡単に可能。あなたのサイトにもAI導入 | ||
| + | 2021年2月26日 | ||
| + | 2021年2月28日 | ||
| + | |||
| + | |||
| + | |||
| https:// | https:// | ||
| 行 171: | 行 243: | ||
| https:// | https:// | ||
| + | コマンドライン引数を処理する | ||
| + | < | ||
| + | const args = process.argv.slice(2); | ||
| + | </ | ||
| + | process.argvは、文字列の配列。1番目と2番目の要素は常にnodeコマンドと実行されたスクリプトのファイルパスになる。アプリケーションがコマンドライン引数として使うのは、3番目以降の要素となる。 | ||
| + | process.argv配列を使えばコマンドライン引数を取得できる。 | ||
| + | slice()関数 | ||
| + | →文字列または配列の一部分だけ取り出すメソッド。 | ||
| + | →(配列).slice(2) で、配列の3番目以降を取り出すことになる。 | ||
| - | + | https://www.sejuku.net/blog/25488 | |
| - | + | 【JavaScript入門】sliceで文字列や配列(Array)を切り抜く方法まとめ | |
| - | ===== スマホアプリSpck editor ===== | + | 2019/4/25 |
| - | + | ||
| - | https://spck-code-editor.readthedocs.io/en/latest/editor-settings/ | + | |
| 行 184: | 行 263: | ||
| + | ===== スマホアプリSpck editor ===== | ||
| + | https:// | ||
tensorflow.js/02.lobeで出力したモデルでpredict.1610206994.txt.gz · 最終更新: 2021/01/09 by adash333
