LoginSignup
0
0

More than 5 years have passed since last update.

クラウドサーバでTensorFlow その7

Last updated at Posted at 2017-07-10

概要

クラウドサーバでTensorFlowやってみた。
tensorflowのinceptionで1000分類してみた。

環境

クラウド idcf
linux debian-8.11
tensorflow 1.2
gpu 無し

写真

サンプルコード

var url = 'http:// /cgi-bin/test5.py';
var image = new Image();
image.onload = function() {
    canvas = document.getElementById('canv_original');
    canvas.width = 224;
    canvas.height = 224;
    ctx = canvas.getContext("2d");
    ctx.drawImage(image, 0, 0, 224, 224);
    var img = canvas.toDataURL('image/jpeg');
    $.ajax({
        url: url,
        type: 'POST',
        data: {
            img: img
        },
        dataType: 'json',
        success: function(data) {
            if (data.status)
            {
                $('#report').html('This is ' + data.num + '.');
            }
            else
            {
                $('#report').html('これは、分かりません');
            }
        },
        error: function(res) {
            alert('err');
        }
    });
}
image.src = "/assets/9/1/8/P/918PR.jpg";

成果物

0
0
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
0
0