ラベル

AI Forecast 8306MUFG (211) Social (75) life (70) Financial (62) IT (57) Proposal (56) idea (50) Fund Management (48) Trading (43) economics (42) Covid-19 (40) AI (38) Hedge Fund (36) Risk (36) Culture (31) BOJ (29) Science (26) hobby (24) accounting (17) Apps (16) career (11) job (7) Travel (5) emotion (5) Hiking (4) music (3) Statarb (2) piano (2)

2019年10月29日火曜日

見えたものを声で教えるAI AI tells you what AI sees

見たものを声で教えるAI
AI tells you what AI sees



カメラに映ったものをAIが声でおしえてくれるよ。やってみよう!現在Win10のPCのみで動作。動作しない場合、ブラウザのハードウエアアクセラレーションをOFFにしてみてください。プログラムはこちら。  AI tells you what AI sees. Let's try! Now works on Win10 PC only. If does not work, pls try turning off browser hardware accelerationGitHub is here.

2019年10月26日土曜日

関数補間マシンとしてのAI実験  AI Experiment as a Function Interpolation Machine

関数補間マシンとしてのAI実験 

AI Experiment as a Function Interpolation Machine




ニューラルネットは補間関数と前に述べたが、下の自作ツールで試してみよう!Ealier I mentioned that neural net is an interpolation function so let's try it out now in below tool I made!

10個のデータポイントを色々変えると、関数が難しくなるにつれて、ニューロン数、繰り返し回数、中間層の数を増やさないと追従できなくなることが確認できる。If you change 10 data points, as the function becomes complex, you can see that interpolation becomes more difficult unless you increase number of neurons, epochs, layers.

活性化関数は全部で11ある。There are all 11 activation functions you can try (elu, hardsigmoid, linear, relu, relu6, selu, sigmoid, softmax, softplus, softsign, tanh).

枠内の数字を変えてボタンを押すと計算終了後に与えた関数および推定関数を表示する。計算速度は利用中のパソコンの性能によりかなり時間がかかる場合がある。If you change numbers in the boxes then click button, your input function set as well as its approximation are shown at the button graph. Calculation takes longer depending on the spec of your computer.

なお、本プログラムはJavascript版のTensorflowで書かれており、計算はあなたのマシンでローカルに実行している。プログラムはココ。For information, this program is written in Javascript version of Tensorflow and calculation is done on your machine locally. Program is here.


Neuralnet Capability Check on Javascript based Tensorflow
NumOfNeurons/layerニューロン数/層
NumOfEpoch教育繰り返し回数
InputLyrActivFunc入力層活性化関数
HidnLyrActivFunc中間層活性化関数
NumOfHiddenLayer中間層の数

Value of Y when X = 1, X=1の場合のYの値
Value of Y when X = 2, X=2の場合のYの値
Value of Y when X = 3, X=3の場合のYの値
Value of Y when X = 4, X=4の場合のYの値
Value of Y when X = 5, X=5の場合のYの値
Value of Y when X = 6, X=6の場合のYの値
Value of Y when X = 7, X=7の場合のYの値
Value of Y when X = 8, X=8の場合のYの値
Value of Y when X = 9, X=9の場合のYの値
Value of Y when X = 10, X=10の場合のYの値

2019年10月18日金曜日

日本の超安スマホ電話代は月額1,400円だ! Super Low Cost Smart Phone Bill in Japan is $13/Month !

日本の超安スマホ電話代は月額1,400円だ!

Super Low Cost Smart Phone Bill in Japan is $13/Month !



2019年10月現在の、日本の携帯電話超安セットは概略こうだ。月に3ギガまでインターネットが使え、電話も自由にできる。携帯電話代を節約したい人には、是非お薦めだ。Super Low Cost Cell Phone Bill profile in Japan as of Oct 2019.  Condition is 3GigaByte/M with internet and conversation. Highly recommended for those who wish to reduce phone bill in Japan.

データ接続SIM(3ギガ/月)を契約する。1,000円/月。初期費用3千円。Subscribe SIM for Data connection (3GigaByte/M). JPY1,000/Month with initial cost of JPY3,000.
SkypeIn番号を取得する。400円/月。 Purchase Skype In Number. JPY400/Month.

これで、初期投資1万3千円、月払い1,400円のインターネット+携帯電話環境が完成!This makes internet+phone setup with only initial investment of JPY13K(USD110), monthly payment JPY1.4K(USD12).
  • 利点 Advantage
    • コストが低い Cheap
    • SIMはNTTのため、接続エリアはDOCOMO並み Connection area equivalent to NTT
    • 他のIP電話(LINE上の音声会話など)も自在 Can use voice on other IP based framework such as LINE
    • 電話の発信もSkypeOutで容易にできる Can make call by the use of SkypeOut
  • 欠点 Downside
    • ある程度、問題処理ができることが必要。Need to cope with problems to some extent.
    • 中華アンドロイドは当たり外れがあるので、Amazonのレビュー欄などを注意深くチェック。冒険したくない人はヤフオクで中古のiPhoneを購入 Chinese Android's quality is not stable so need to check review and comments. If you prefer trouble free, better to purchase used iPhone at Yahoo Auction.
    • Skypeの利用のため、送受信時にワンクッションある Skye is not really responsible compared to regular voice phone
    • 安い中華スマートフォンは電池容量が少ない Cheap Chinese Smart Phone does not have big battery capacity.

2019年10月14日月曜日

歴史の振り子..米国で社会主義!?  History's Pendulum .. Socialism in USA!?

歴史の振り子。米国で社会主義!? 
History's Pendulum. Socialism in USA!? 


 米国で社会主義が勢力を増大しているという。Socialism looks in increasing trend in USA.

 先鋭化し過ぎた資本主義が、共産主義、社会主義を生み、腐敗の後に資本主義を取り入れ成功したと思っていたら、本家本元の資本主義もまた、修正を余儀なくされているようだ。トランプ現象、BREXITも資本主義に取り残された人々から生まれた民主的な革命だ。  Capitalism gone too extreme created communism and capitalism, that was later corrupted, then incorporated capitalism to be successful however, now, even the original capitalism looks requiring for further amendment to survive.

右に、左に、大きく振れた社会体制の振り子は、1周期の起点にまた戻りつつある。 しかしここで、米国が社会主義国家になってしまっては、人間は全く歴史から学んでいないことになる。 Pendulum of social frameworks swung big toward right and left, now looks swinging back to the starting point.  But if USA converts to socialism, then it means that human being did not learn anything from history.

資本主義の本尊である米国には是非大局的な視点から資本主義の建設的な修正をリードしてもらいたものだ。 所得の再配分を徹底化することが一つの答えだろう。具体的には、累進課税の強化とベーシックインカム、資産課税だろう。As a guru of capitalism, I wish USA will lead the constructive and holistic amendment of capitalism. Thorough enforcement of redistribution of income can be one answer.  In more concrete manner, it will be the enforcement of the progressive tax, basic income and tax on asset.


2019年10月13日日曜日

Javasctipt Canvasアプリをアプリをブログに挿入する二つの方法。Two ways to migrate JavaScript Canvas application to Blog


Javasctipt Canvasアプリをブログに入れる二つの方法。

Two ways to migrate JavaScript Canvas application to Blog



Javascriptは完成品のWebベースの展開が容易であることから、簡易なAIの開発については今後Tensorflow.jsが主流になるだろう。ここでは、ML5もしくはTensorflow.jsアプリをブログに掲載する場合の変更点を書いた。Tensorflow.js will be mainstream for light AI development going forward due to its product scalability through Web. Here I wrapped the points of changes when migrating the ML5 or Tensorflow.js application to blog.

Method1-ML5)
制御がML5にあり、CallBack スタイルなため、Parent関数を使って、Canvasが属しているdivを指定する Control is under ML5 due to call-back style, specify the div where Canvas belongs using Parent function.
Sample https://randomwalkjapan.blogspot.com/2019/10/mobilenetusing-mobilenet-inside-blogspot.html

div id="myContainer379"
MyCanvas=createCanvas(320, 240);
MyCanvas.parent('myContainer379');
video = createCapture(VIDEO);
video.parent('myContainer379')

Method2-Tensorflow.js)
制御が自分にあるため、appendChild関数を使って、Canvasをdivに帰属させる User has control, hence let Canvas belong to div using appendChild function.
Sample .. Pls implement below to any apps, then it will be part of your blog.

div id="mainContent1432"
var canvas = document.createElement("canvas");
var mydiv = document.getElementById("mainContent1432");
mydiv.appendChild(canvas);



2019年10月11日金曜日

YOLO(物体認識AI)で遊んでみよう Let's play on YOLO(AI Object Detector)

YOLO(物体認識AI)で遊んでみよう
 Let's play on YOLO (AI Object Detector)



YOLOは物体認識AIで、自動運転などでの報道でお馴染みだと思う。このページをパソコンで開けるだけで(カメラは必要だが)動く。コードはこちら現状ではWin10のChrome上、「ハードウエアアクセラレーション」はONで動作確認しています。

YOLO is an object detection AI that many may be familiar in news on auto-driving.  Just open up this page and you can run it(camera is necessary). Code is here. Note that this is confirmed to work on Win10 Chrome with hardware acceleration ON in browser setting.



2019年10月10日木曜日

子供の水いぼに、ヨクイニンのすすめ Yokuinin Recommendation for Kid's Water Warts

子供の水いぼに、ヨクイニンのすすめ

Yokuinin Recommendation for Kid's Water Warts



2年ほど前、小学生の子供がプールで水いぼにかかった。全身ではないけれど、よく見るとあちこちにある。皮膚科に行くと、液体水素を使ったピンセットでの除去を継続する通院を奨められた。こどもは嫌がった。ネット情報で知ったヨクイニンを代わりに3か月分もらった。結果、2か月で水いぼは完全に消滅。物理的な除去を決断する前に、ためらわず、親から医師に要求することをお勧めする。ちなみにヨクイニンハトムギのエキスで安価である。

2yrs ago, elementary school kid got inflicted by water warts. Not all over the body but I could see here and there if I looked close. Dermatology doctor recommended physical one by one removal by tweezers and liquid nitrogen. Kid hated it.  Instead, we got Yokuinin for 3 month that I learned as effective sometimes by net search. As a result, all the water warts were gone in 2 month.  I recommend not to hesitate to request doctor for Yokuinin before going for physical removal.  For information, Yokuinin is an essence of Pearl barley that is less expensive.


2019年10月8日火曜日

Webアプリから実行環境情報取得 PC Info retrieval from Web application


Webアプリからの実行環境情報取得

PC Info retrieval from Web application





Web上で走るプログラム(JavaScript)側から、実行環境を調べる必要が出てくる。例えばビデオ入力。カメラの位置(表か裏か)を知るため、実行環境がPCか、スマートフォン/タブレットかを知る必要がある。Sometimes we need to find out local machine information from web application(JavaScript). Video input is one example. Program needs to know if local machine is PC or smart phone/tablet to find out hardware location of Cameras(front/rear).

因みに、次のリスト(Computer Information)は、今このブログが実行されている端末の情報である。For reference, below list(Computer Information) shows local machine information where current blog is running on.

            document.writeln(navigator.platform)
            document.writeln(navigator.appVersion)
            document.writeln(navigator.oscpu)
            document.writeln(navigator.navigator)
            document.writeln(navigator.platform.indexOf("Linux"))
            document.writeln(navigator.platform.indexOf("iPhone"))
            document.writeln(navigator.platform.indexOf("iPad"))



Android、iPad、PCについて上記の情報をチェックした結果、Android端末を検出するにはnavigator.platformに文字Linux、iPhoneは文字iPhone、iPadは文字iPadがあるかないかで判定できるであろうことが推測できた。下は、これらの情報を用いた利用例である。I checked the above information for Android, iPad, iPhone and found out that characters Linux, iPhone, iPad can be used to detect Android, iPhone, iPad respectively retrieving from navigator.platform. Below is one example.

    if(navigator.platform.indexOf("Linux")!=-1 || navigator.platform.indexOf("iPhone")!=-1 || navigator.platform.indexOf("iPad")!=-1) {
      video = createCapture({audio:falsevideo:{facingMode:{exact:"environment"}}}); }
      else {video = createCapture(VIDEO);}


ここで「できるであろう」と書いたのは、Androidなのに、文字Androidが入っている場合とない場合があるようで、確固とした業界基準がないように見受けられたからだ。I wrote "can be" since I see a case where there is no character 'Android' even though machine is definitely Android, hence it looks there is no clear standard.

2019年10月5日土曜日

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

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



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

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.  Pls try out for simple objects such as lion or zebra.  If does not work, pls try turning off hardware acceleration. Due to heavy computation, reactions will be slow. Pls deny camera access request if you do not wish to run. 

なお、BlogSpotの記事の場所に結果を表示するには、下のようにparentメソッドを利用します。ソース全体(GitHub)はこちら。 To display the result on blog body, use parent method as below. Complete Source is here(GitHub).

body
  div id='myContainer'/div
body

                 --- Skipped so pls see GitHub for complete source --

script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js" /script>

  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'videomodelReady);
    resultsP = createP('Loading model and video...');
    resultsP.parent('myContainer')
  }

                --- Skipped so pls see GitHub for complete source --

  // When we get a result
  function gotResult(errresults) {
    // The results are in an array ordered by confidence.
    resultsP.html(results[0].label + ' ' + nf(results[0].confidence02));
    resultsP.parent('myContainer')
    classifyVideo();
  }
 /script
..Code shown from simple Cut and Pasted from Visual Studio Code
(pls delete, "white-space: pre;" after cut and paste. also pls correct for bracket for script and body since brackets are deleted to make output looks nicer :)