Comments (23)
こんな感じでPRをつくってみました.
dlboxでも学習できることを確認しました.
https://github.com/knorth55/coral_usb_ros/pull/32
from coral_usb_ros.
これはかなりうまくいってそうな感じですかね!
Trackingもパパッとできればさらに安定しそうですね
GPUいらないTrackingは準備してみます
from coral_usb_ros.
@k-okada @MiyabiTane configsファイルにオーグメンテーションについては書かれています.
もともとのSSDの学習スクリプトのままですが,random_holizontal_flip
をしています.
https://github.com/knorth55/coral_usb_ros/blob/master/training/labelme_voc/scripts/configs/pipeline_mobilenet_v2_ssd_retrain_last_few_layers.config#L135-L142
もとから何が用意されているかは,ここを読むと書いています.
https://github.com/tensorflow/models/blob/v1.12.0/research/object_detection/builders/preprocessor_builder.py
試してはいないですが,コードを読む限り,先に定義されているものとしては以下のようなものがあるようです.
'normalize_image':
preprocessor.normalize_image,
'random_pixel_value_scale':
preprocessor.random_pixel_value_scale,
'random_image_scale':
preprocessor.random_image_scale,
'random_rgb_to_gray':
preprocessor.random_rgb_to_gray,
'random_adjust_brightness':
preprocessor.random_adjust_brightness,
'random_adjust_contrast':
preprocessor.random_adjust_contrast,
'random_adjust_hue':
preprocessor.random_adjust_hue,
'random_adjust_saturation':
preprocessor.random_adjust_saturation,
'random_distort_color':
preprocessor.random_distort_color,
'random_jitter_boxes':
preprocessor.random_jitter_boxes,
'random_crop_to_aspect_ratio':
preprocessor.random_crop_to_aspect_ratio,
'random_black_patches':
preprocessor.random_black_patches,
'rgb_to_gray':
preprocessor.rgb_to_gray,
'scale_boxes_to_pixel_coordinates': (
preprocessor.scale_boxes_to_pixel_coordinates),
'subtract_channel_mean':
preprocessor.subtract_channel_mean,
'convert_class_logits_to_softmax':
preprocessor.convert_class_logits_to_softmax,
if step_type == 'random_horizontal_flip':
if step_type == 'random_vertical_flip':
if step_type == 'random_rotation90':
if step_type == 'random_crop_image':
if step_type == 'random_pad_image':
if step_type == 'random_crop_pad_image':
if step_type == 'random_resize_method':
if step_type == 'resize_image':
if step_type == 'ssd_random_crop':
if step_type == 'ssd_random_crop_pad':
if step_type == 'ssd_random_crop_fixed_aspect_ratio':
if step_type == 'ssd_random_crop_pad_fixed_aspect_ratio':
ちなみにですが,学習スクリプトとしてはtensorflow/[email protected]
の以下にあるPythonスクリプトを走らせています.
https://github.com/tensorflow/models/blob/v1.12.0/research/object_detection/model_main.py
from coral_usb_ros.
@k-okada @MiyabiTane
APCのときはimgaug
をつかっていました.
https://github.com/aleju/imgaug
APCとかだと,ここらへんのコードでオーグメンテーションしていますが,tensorflowの流れにうまくつなげられるかはわかりません.
https://github.com/start-jsk/jsk_apc/blob/master/demos/grasp_fusion/grasp_fusion_lib/aug.py
https://github.com/start-jsk/jsk_apc/blob/master/demos/instance_occlsegm/instance_occlsegm_lib/aug.py
最近はalbumentations
などもあります.
https://github.com/albumentations-team/albumentations
from coral_usb_ros.
なるほど,で,https://github.com/tensorflow/models/blob/v1.12.0/research/object_detection/builders/preprocessor_builder.py にrandom_holizontal_flipが見つからないけど,どこを見たらある?random_rotateみたいなのがあれば,シンプルに良くなりそうだけど.
from coral_usb_ros.
@k-okada random_horizontal_flip
は以下の部分に書かれています.
https://github.com/tensorflow/models/blob/v1.12.0/research/object_detection/builders/preprocessor_builder.py#L142-L148
定義はここに書かれています.
https://github.com/tensorflow/models/blob/v1.12.0/research/object_detection/core/preprocessor.py#L443-L537
RGB値をいじって輝度や彩度いじる,回転する,スケールする,はシンプルに良くなりそうな気がします.
from coral_usb_ros.
from coral_usb_ros.
ナイス! @MiyabiTane @Kanazawanaoaki たぶん今あるトレーニングスクリプト同じものを走らせたら勝手にオーギュメンテ―ションして学習してくれるはずなので,試してみましょう.
from coral_usb_ros.
試してみます、ありがとうございます!
from coral_usb_ros.
遅くなりましたが、学習を試してみたところエラーになってしまいました。
ログはこちらです。よろしくお願い致します。
https://gist.github.com/MiyabiTane/70f1ed4569aa276dfaf186bfcd6dd940#file-coral-L3090-L3133
(num_training_stepsはデフォルトで2000だったのに指定してしまいました...)
from coral_usb_ros.
@MiyabiTane
これはおそらく @tongtybj 先生がdlbox1で学習をしていたので,GPUメモリが足りずに学習できなかったようですね.
学習するまえにnvidia-smiでGPUのメモリが使われているかどうかをチェックしてみるといいかとおもいます.
同じようにdlbox2やdlbox3にログインできると思うので,そちらでやってみてください.
$ nvidia-smi
Sat Oct 17 23:39:33 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.129 Driver Version: 410.129 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN X (Pascal) Off | 00000000:05:00.0 On | N/A |
| 39% 66C P2 97W / 250W | 12180MiB / 12192MiB | 67% Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN X (Pascal) Off | 00000000:06:00.0 Off | N/A |
| 49% 81C P2 105W / 250W | 11679MiB / 12196MiB | 66% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce GTX 108... Off | 00000000:09:00.0 Off | N/A |
| 76% 82C P2 98W / 250W | 9555MiB / 11178MiB | 65% Default |
+-------------------------------+----------------------+----------------------+
| 3 GeForce GTX 108... Off | 00000000:0A:00.0 Off | N/A |
| 65% 67C P2 101W / 280W | 10197MiB / 11178MiB | 75% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 7273 G /usr/lib/xorg/Xorg 39MiB |
| 0 16539 C /opt/conda/bin/python 12129MiB |
| 1 16540 C /opt/conda/bin/python 11667MiB |
| 2 16541 C /opt/conda/bin/python 9543MiB |
| 3 16542 C /opt/conda/bin/python 10185MiB |
+-----------------------------------------------------------------------------+
また金沢くんが別のGPUを選んで学習できるようにスクリプトをかえてくれました. #35
これを使うと同じDlboxの違うGPUでも学習できると思います.
cc. @Kanazawanaoaki
from coral_usb_ros.
すみません。告知なしでdlbox1をフルで使っています。
もうしばらく(一ヶ月ぐらい?)、使う予定ですが、
これはメールで告知した方がいいのかな? @knorth55
from coral_usb_ros.
dlbox2で試してみたのですが、同じエラーになってしまいました。
tanemoto@dlbox2:~$ nvidia-smi
Sun Oct 18 00:27:42 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN X (Pascal) Off | 00000000:05:00.0 Off | N/A |
| 18% 31C P0 59W / 250W | 0MiB / 12194MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN X (Pascal) Off | 00000000:06:00.0 Off | N/A |
| 18% 34C P0 63W / 250W | 0MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 TITAN X (Pascal) Off | 00000000:09:00.0 Off | N/A |
| 34% 50C P0 58W / 250W | 0MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 TITAN X (Pascal) Off | 00000000:0A:00.0 Off | N/A |
| 26% 41C P0 57W / 250W | 0MiB / 12196MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
from coral_usb_ros.
貼り忘れましたすみません
https://gist.github.com/MiyabiTane/bad1bcc18cf45db2a7dc3a54e2f9d6eb
from coral_usb_ros.
すみません。告知なしでdlbox1をフルで使っています。
もうしばらく(一ヶ月ぐらい?)、使う予定ですが、
これはメールで告知した方がいいのかな? @knorth55
@tongtybj
そうですね,告知してもらうと嬉しいです.
もしくはdlbox1, dlbox2は避けてもらえたらと思います.
B4の人たちはdlbox1, 2の桁が少ないところをよく使っているイメージなので.
from coral_usb_ros.
了解です。
dlbox7,8あたりを使い、告知するようにします。
from coral_usb_ros.
@tongtybj よろしくお願いします.
from coral_usb_ros.
@MiyabiTane dlbox2で今さっき学習してみましたができました.つかっているrun.shはcoral_usb_ros/training/label_me_voc/run.sh
ですか?データセットも共有してくれると嬉しいです.
from coral_usb_ros.
dlbox1の方を解放しました。
from coral_usb_ros.
@MiyabiTane dlbox2で今さっき学習してみましたができました.つかっているrun.shはcoral_usb_ros/training/label_me_voc/run.shですか?データセットも共有してくれると嬉しいです
@tongtybjありがとうございます。
@knorth55 試して頂きありがとうございます。coral_usb_ros/training/label_me_voc/run.shです。データセットは以下のtrainとtestです。https://drive.google.com/drive/folders/1pVdDRnUVv1WZ7sSrFfaX1DYGBjwvbiOy
from coral_usb_ros.
今朝dlbox1でやり直したところ学習させることができました。お騒がせしました。
from coral_usb_ros.
オーギュメンテーション前と後での認識の様子の動画を撮ったので共有させて頂きます。
オーギュメンテーション前▷https://drive.google.com/file/d/1xjAtXM2X58vmX8dtt4wF4tTApu9pfvEo/view?usp=sharing
オーギュメンテーション後▷https://drive.google.com/file/d/1WvVLZbHghNnx6tPO9W7sV9qd5bEB_WYk/view?usp=sharing
学習結果のグラフや入力画像はここにまとめてあります。
https://drive.google.com/drive/folders/18zGhtHVP6BRTxX_mL1gOnJ9Oj9Iaw073
20201001▷num_training_steps2000と20201018を比較して頂ければと思います。
from coral_usb_ros.
だいぶ良くなった印象です!
ありがとうございます!
from coral_usb_ros.
Related Issues (20)
- tensorflow v2 model support HOT 6
- /edgetpu_object_detector/output/image is not published HOT 6
- Add some functions for own purposes HOT 5
- Run two models in one EdgeTPU USB HOT 2
- dynamic reconfigure in ROS noetic - missing import HOT 3
- catkin_make instead of catkin build failed HOT 10
- Project name in CMakeLists.txt is different from package name? HOT 3
- node publishes faster than receiving messages? HOT 4
- support pycoral
- dynamic_reconfigure goes wrong when edgetpu related nodes exist HOT 5
- support panorama images
- Support boundaries in panorama imags
- How to run demo HOT 26
- rosrun jsk_perception image_publisher.py does not work (?) HOT 1
- Tuple index out of range HOT 2
- noetic-jsk-perception failed HOT 9
- rviz support ? HOT 12
- RectArray output of panorama human pose estimator does not match PoseArray output
- catkin build hangs HOT 2
- ImportError: No module named '_edgetpu_cpp_wrapper' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coral_usb_ros.