Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vuzix Developer Conference 20171201

ARIYAMA Keiji
December 01, 2017

Vuzix Developer Conference 20171201

2017年12月1日に開催されたVuzix Developer Conferenceでの発表資料です。

「M300で    アプリ開発」

ARIYAMA Keiji

December 01, 2017
Tweet

More Decks by ARIYAMA Keiji

Other Decks in Technology

Transcript

  1. C-LIS CO., LTD.

  2. C-LIS CO., LTD.  ༗ࢁܓೋʢ,FJKJ"3*:"."ʣ $-*4$0 -5% "OESPJEΞϓϦ։ൃνϣοτσΩϧ Photo by

    Koji MORIGUCHI (MORIGCHOWDER)
  3. 76;*9%FWFMPQFS$POGFSFODF    .ͰɹɹɹɹΞϓϦ։ൃ

  4. . 

  5. 6*ʢग़ྗʣ  nHD - 640x360 (16:9)

  6. 6*ʢೖྗʣ  Χϝϥ

  7. 6*ʢೖྗʣ  KEYCODE_DPAD_LEFT KEYCODE_DPAD_RIGHT KEYCODE_ENTER

  8. 6*ʢೖྗʣʔϘλϯΛ௕ԡ͠  ϗʔϜϘλϯ KEYCODE_BACK KEYCODE_MENU

  9. 6*ʢೖྗʣ  λονύου

  10. .ΞϓϦ։ൃߟྀ͢΂͖఺ 3VOUJNF1FSNJTTJPO Χϝϥͷ্Լ λονύωϧʹґଘ͠ͳ͍ը໘ઃܭ 

  11. "OESPJE.BSTINBMMPX 

  12. 3VOUJNF1FSNJTTJPO 

  13. Χϝϥͷ্Լ 

  14. CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId); mSensorOrientation

    = characteristics.get(CameraCharacteristics.SENSOR_ORIENTATION); // Orientation int rotation = activity.getWindowManager().getDefaultDisplay().getRotation(); int orientation = (ORIENTATIONS.get(rotation) + mSensorOrientation + 270) % 360; captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, orientation);  ݱࡏͷը໘ํ޲ɾΧϝϥͷํ޲Λߟྀ https://github.com/googlesamples/android-Camera2Basic
  15. λονύωϧʹґଘ͠ͳ͍ը໘ઃܭ 

  16.  ࣄྫ̍ ϑΥʔΧεͷҠಈ

  17. ϑΥʔΧεͷॱ൪͕௚ײతͰͳ͍ 

  18. <LinearLayout> <LinearLayout> <Button android:id="@+id/button1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 1" />

    <Button android:id="@+id/button2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 2" /> </LinearLayout>  ϑΥʔΧεҠಈ <LinearLayout> <Button android:id="@+id/button3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 3" /> <Button android:id="@+id/button4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 4" /> </LinearLayout> </LinearLayout>
  19. <LinearLayout> <LinearLayout> <Button android:id="@+id/button1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 1" android:nextFocusRight="@+id/button4"

    android:nextFocusLeft="@+id/button2" /> <Button android:id="@+id/button2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 2" android:nextFocusRight="@+id/button1" android:nextFocusLeft="@+id/button3" /> </LinearLayout>  OFYU'PDVT-FGU3JHIU <LinearLayout> <Button android:id="@+id/button3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 3" android:nextFocusRight="@+id/button2" android:nextFocusLeft="@+id/button4" /> <Button android:id="@+id/button4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button 4" android:nextFocusRight="@+id/button3" android:nextFocusLeft="@+id/button1" /> </LinearLayout> </LinearLayout>
  20. ϑΥʔΧεҠಈઃఆޙ 

  21.  ࣄྫ̎ λον͕࢖͑ͳ͍৔߹ͷ6*

  22. ΞΫγϣϯόʔͷεΠονʹΞΫηεͰ͖ͳ͍  https://github.com/DeviceConnect/DeviceConnect-Android

  23. <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/activity_service_manager_power" app:actionViewClass="android.widget.Switch" app:showAsAction="always"

    android:title="@string/app_name"/> <item android:id="@+id/activity_service_menu_item_settings" app:showAsAction="never" android:title="@string/activity_service_menu_settings"/> <item android:id="@+id/activity_service_menu_item_help" app:showAsAction="never" android:title="@string/activity_service_menu_help"/> </menu>  SFTNFOVBDUJWJUZ@TFSWJDF@MJTUYNM
  24. <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/activity_service_menu_item_settings" app:showAsAction="never" android:title="@string/activity_service_menu_settings"

    /> <item android:id="@+id/activity_service_menu_item_help" app:showAsAction="never" android:title="@string/activity_service_menu_help" /> </menu>  SFTNFOVOPUPVDIBDUJWJUZ@TFSWJDF@MJTUYNM
  25. <LinearLayout android:id="@+id/activity_service_list_buttons_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <Switch android:id="@+id/activity_service_list_manager_switch" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_margin="8dp"

    android:layout_weight="1" android:text="@string/app_name" /> <Button android:id="@+id/activity_service_list_search_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_margin="8dp" android:layout_weight="1" android:text="@string/activity_service_list_search" /> </LinearLayout>  SFTMBZPVUOPUPVDIBDUJWJUZ@TFSWJDF@MJTUYNM
  26. λονύωϧ͕࢖͑ͳ͍6*ʹରԠ 

  27. 76;*9%FWFMPQFS$POGFSFODF    .ͰɹɹɹɹΞϓϦ։ൃ

  28. 76;*9%FWFMPQFS$POGFSFODF    .ͰػցֶशΞϓϦ։ൃ

  29. 5FOTPS'MPXͱ͸  ೥݄ɺถ(PPHMF͕ࣾΦʔϓϯιʔεԽͨ͠ ػց஌ೳ޲͚ͷܭࢉϑϨʔϜϫʔΫ

  30. 5FOTPS'MPXͷಛ௃  ࣄલʹܭࢉάϥϑΛߏஙɺ࣮ߦ͢ΔύϥμΠϜ େن໛ͳฒྻɾ෼ࢄܭࢉʹରԠ 1$ʢαʔόʔʣʹՃ͑ͯɺ
 ϞόΠϧɺϘʔυίϯϐϡʔλʔͳͲ
 ෳ਺ͷϓϥοτϑΥʔϜ্Ͱಈ࡞ʢ˞ʣ ※ ݱࡏ͸inferenceʢਪ࿦ʣݶఆ

  31. "OESPJEʹରԠ  ୺຤ͷηϯαʔ৘ใΛ࢖ͬͯδΣενϟʔΛ ൑ผ͢Δ"OESPJEΞϓϦͷ࡞੒ 5FOTPS'MPXͷֶशࡁΈϞσϧΛ"OESPJE
 ΞϓϦ͔ΒಡΈࠐΜͰར༻͢Δ

  32. ࡞Δ΋ͷ .Λ૷ணͯ͠टΛৼΔδΣενϟͰɺ :&4ɾ/0 Λ൑ఆ͢Δ 

  33. Ϟσϧ  conv 1x5
 64 max_pool 1x3 fully connected 192

    ʢdropout 0.5ʣ output
 2 size = 256
  34. ֶश৚݅ ܇࿅σʔλ:FT /P ֶशΞϧΰϦζϜ"EBN ֶश཰ όοναΠζ ֶशεςοϓ਺  

  35. ग़ྗϞσϧͷߏ଄  model.pb input_accel input_gyro softmax_logits

  36. dependencies {
 compile fileTree(dir: 'libs', include: ['*.jar'])
 androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
 exclude

    group: 'com.android.support', module: 'support-annotations'
 })
 compile 'com.android.support:appcompat-v7:25.3.1'
 compile 'com.android.support.constraint:constraint-layout:1.0.2'
 testCompile 'junit:junit:4.12'
 
 compile 'org.tensorflow:tensorflow-android:1.4.0'
 }
  CVJMEHSBEMF
  37. ֶशࡁΈϞσϧͷ഑ஔ 

  38. private static final String MODEL_FILEPATH = "model.pb";
 private final TensorFlowInferenceInterface

    mTfInference;
 GestureDetector(AssetManager am) {
 mTfInference = new TensorFlowInferenceInterface(am, MODEL_FILEPATH);
 }
  ϞσϧͷಡΈࠐΈ
  39. GestureType recognizeGesture(float[] accelData, float[] gyroData) {
 
 mTfInference.feed("input_accel", accelData, accelData.length);


    mTfInference.feed("input_gyro", gyroData, gyroData.length);
 
 mTfInference.run(new String[]{"softmax_logits"});
 
 mTfInference.fetch("softmax_logits", mRecognizeGestureResult);
 
 for (int index = 0; index < mRecognizeGestureResult.length; index++) {
  (FTUVSF%FUFDUPSͷ࣮૷ʢGFFEʣ
  40. GestureType recognizeGesture(float[] accelData, float[] gyroData) {
 
 mTfInference.feed("input_accel", accelData, accelData.length);


    mTfInference.feed("input_gyro", gyroData, gyroData.length);
 
 mTfInference.run(new String[]{"softmax_logits"});
 
 mTfInference.fetch("softmax_logits", mRecognizeGestureResult);
 
 for (int index = 0; index < mRecognizeGestureResult.length; index++) {
  (FTUVSF%FUFDUPSͷ࣮૷ʢSVOʣ
  41. GestureType recognizeGesture(float[] accelData, float[] gyroData) {
 
 mTfInference.feed("input_accel", accelData, accelData.length);


    mTfInference.feed("input_gyro", gyroData, gyroData.length);
 
 mTfInference.run(new String[]{"softmax_logits"});
 
 mTfInference.fetch("softmax_logits", mRecognizeGestureResult);
 
 for (int index = 0; index < mRecognizeGestureResult.length; index++) {
  (FTUVSF%FUFDUPSͷ࣮૷ʢGFUDIʣ
  42.  σϞ

  43. C-LIS CO., LTD. ຊࢿྉ͸ɺ༗ݶձࣾγʔϦεͷஶ࡞෺Ͱ͢ɻຊࢿྉͷશ෦ɺ·ͨ͸Ұ෦ʹ͍ͭͯɺஶ࡞ऀ͔ΒจॻʹΑΔڐ୚Λಘͣʹෳ੡͢Δ͜ͱ͸ې͡ΒΕ͍ͯ·͢ɻ 5IF"OESPJE4UVEJPJDPOJTSFQSPEVDFEPSNPEJpFEGSPNXPSLDSFBUFEBOETIBSFECZ(PPHMFBOEVTFEBDDPSEJOHUPUFSNTEFTDSJCFEJOUIF$SFBUJWF$PNNPOT"UUSJCVUJPO-JDFOTF ֤੡඼໊ɾϒϥϯυ໊ɺձ໊ࣾͳͲ͸ɺҰൠʹ֤ࣾͷ঎ඪ·ͨ͸ొ࿥঎ඪͰ͢ɻຊࢿྉதͰ͸ɺ˜ɺšɺäΛׂѪ͍ͯ͠·͢ɻ 5IF"OESPJESPCPUJTSFQSPEVDFEPSNPEJpFEGSPNXPSLDSFBUFEBOETIBSFECZ(PPHMFBOEVTFEBDDPSEJOHUPUFSNTEFTDSJCFEJOUIF$SFBUJWF$PNNPOT"UUSJCVUJPO-JDFOTF