LoginSignup
1
1

More than 3 years have passed since last update.

ブログスポットの中でのMobileNet利用 / Using MobileNet inside BlogSpot

Last updated at Posted at 2019-10-07
1 / 2

ブログスポットの中でのMobileNet利用

Using MobileNet inside BlogSpot

[Demo]
https://randomwalkjapan.blogspot.com/2019/10/mobilenetusing-mobilenet-inside-blogspot.html

[Source]
https://github.com/tanakayutaka/MobileNetOnBlogspot-Blogger-

Googleが運営する無料ブログサービスであるブログスポット(このサイト)に、カメラに映った映像を分類するMobileNetという実験プログラムを組み込んでみた。既に学習済みのネットを利用するだけで、学習は行わない。映し出された窓にはカメラの映像が、その下に画像判定結果とその可能性(0から1の範囲)が示される。計算負荷が大きいため処理が遅くなります。実行したくない人はカメラアクセスを拒否してください。

Installed MobileNet on this site, blogspot, i.e., Google's free blog service. This only classifies object based on pre-educated neural net but no new learning is done. Under the camera video shown, object name and possibilities(0-1) are shown. Due to heavy computation, reactions will be slow. Pls deny camera access if you do not wish to run.

なお、BlogSpotの記事の場所に結果を表示するには、下のようにparentメソッドを利用します。To display the result on blog body, use parent method as below.

<body>

<div id='myContainer'></div>

</body>

function setup() {

// Create a camera input

video = createCapture(VIDEO);

video.parent('myContainer')

video.size(200,300)

// Initialize the Image Classifier method with MobileNet and the video as the second argument

classifier = ml5.imageClassifier('MobileNet', video, modelReady);

resultsP = createP('Loading model and video...');

resultsP.parent('myContainer')

}

function gotResult(err, results) {

// The results are in an array ordered by confidence.

resultsP.html(results[0].label + ' ' + nf(results[0].confidence, 0, 2));

resultsP.parent('myContainer')

classifyVideo();

..Just Cut & Paste from Visual Studio Code

(also pls delete, white-space: pre; )

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1