2021-01-01から1年間の記事一覧

ROC曲線としきい値

しきい値を動かしてROC曲線を描いてみる from sklearn.datasets import load_breast_cancer data = load_breast_cancer() X = data.data y = data.target from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_t…

KerasによるGPUメモリの占有を防ぐ

teratail.com 以下を実行する。 import os os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'

Tensorflow(Keras)でGPUを使って計算する

1. nvidia-cuda-toolkitのインストール sudo apt install nvidia-cuda-toolkitlibcuda v10.1がダウンロードされた $ ls /usr/lib/x86_64-linux-gnu/libcuda* /usr/lib/x86_64-linux-gnu/libcudart.so.10.1環境変数に以下を追加 export PATH=/usr/lib/x86_64-…

多クラス分類問題のROC曲線

stackoverflow.com from sklearn.metrics import roc_curve, auc from sklearn import datasets from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.preprocessing import label_binarize from sklearn.mo…

CNNアーキテクチャの発展と変遷のまとめ

非常に参考になった。 blog.livedoor.jp

2種類の転移学習:Fine tuningとFeature extractor

forums.fast.ai

CNNのアーキテクチャ

medium.com

ファイル名を一括で変更する

askubuntu.com sudo apt install renameutils EDITOR="vim" qmv -f do

Pytorchで学習済みパラメータの保存

tzmi.hatenablog.comGPUで保存→GPUで呼び出す場合 保存 model_path = 'model.pth' torch.save(model.state_dict(), model_path)呼び出し model_path = 'model.pth' model.load_state_dict(torch.load(model_path)) GPUで学習→CPUで保存 model_path = 'model.…

ResNet-18で転移学習

ここを参考に。 qiita.com 学習済みモデルにはResNet-18を使用。 データセットは以下を使用。 Potato Leaf Disease Datasetwww.kaggle.com Train: 3ラベル(Healthy, Early blight, Late blight) 各300枚 Validation: 3ラベル 各100枚実行結果 Training compl…

Ubuntu20にNVIDIAのドライバを入れる

askubuntu.com $ sudo ubuntu-drivers autoinstall

UbuntuのxrdpでDockを表示する

sudo apt-get install gnome-tweak-toolTweaksを起動してDockを有効化する taktak.jp

xrdpで画面が真っ黒になるとき→gnomeセッションを切断する

SSHで入って以下を実行するとWindows remote desktopから接続できた $ pkill gnome-session bracket.hatenablog.com

Ubuntuにxrdpのインストール

linuxize.com

ROS development studioの使い方

これは便利。Gazeboは自分の端末で動かすより動作が速いのでは? www.youtube.com

ArduPilotでGPSナビゲーション

hajimerobot.co.jp prtimes.jp

Raspberry Pi4でRealsense D435を使う

sudo apt-get install ros-$ROS_DISTRO-realsense2-camera roslaunch realsense2_camera demo_pointcloud.launch

RPi4+Ubuntu 20.04 LTS+RealVNCでモニタにつながずに自動でデスクトップを出力する

forums.raspberrypi.com ubuntu-mate.community wiki.sunfounder.ccsudo vim /boot/firmware/config.txt 以下を追記 hdmi_force_hotplug=1 hdmi_drive=2 hdmi_group=2 hdmi_mode=82 hdmi_cvt=1920 1080 60 1 0 0 0解像度の設定 forums.raspberrypi.com /boot…

Raspberry Pi 4にUbuntu 20.04 LTSのDesktopをインストールする

askubuntu.com Rasbperry Pi用のUbuntu 20.04 LTSはServerしか提供されておらず、Desktop版はダウンロードできない。 まずUbuntu Server 20.04LTSを入れてから以下を実行する。 sudo apt-get install ubuntu-desktop

Rasperry Pi 4 + Ubuntu Desktop 20.04 LTSにRealVNC Serverをインストールする

raspberrypi.stackexchange.com追記:以下の2行でいけるかもしれない sudo apt-get install realvnc-vnc-server sudo apt-get install lxsession参考: https://help.realvnc.com/hc/en-us/articles/360002249917-VNC-Connect-and-Raspberry-Pi#setting-up-…

Intel NUC & Ubuntu 16.04 LTSでインターネットにつながらない

askubuntu.com ipv4を強制する、のオプションを入れる

Jetson NanoでRealsense D435を使う

qiita.com sudo apt-get install ros-melodic-realsense2-camera

jetbotでObject followingのサンプルを試す

ssd_mobilenet_v2_coco.engineのバージョンの正しいものを利用する必要がある。 最新版はここにある。github.com

Jetson Nanoで5Wと10W動作を切り替える

www.jetsonhacks.com 5Wモード $ sudo nvpmodel -m 110Wモード $ sudo nvpmodel -m 0

Keras&CIFAR-10のチュートリアル

hiroyuki827.github.io

JetbotのWifi設定

github.com sudo nmcli device wifi list sudo nmcli device wifi connect <ssid_name> password <password></password></ssid_name>

Jetson Nanoでimagenet-cameraサンプルを動かす(失敗)

github.comimagenet-cameraを動かしたいが、カメラの映像がキャプチャできないエラーが出る [cuda] invalid argument (error 11) (hex 0x0B) [cuda] /home/jetbot/src/jetson-inference/utils/codec/gstBufferManager.cpp:288 [gstreamer] gstDecoder -- fai…

安定化電源の設計

xn--p8jqu4215bemxd.com

MyDNSでDDNSを設定する

qiita.com

Nikon 1 J5で星空撮影

photo.nyanta.jp 上記のサイトの設定は30秒、F/4.0、ISO3200 はじめシャッタースピードを30秒にしたら真っ白になった。5秒くらいがちょうどよい。 F値も4.0だと明るいので5.6に設定。5.0s, F/5.6, ISO1600 まだ明るすぎるのでISO800にしたところちょうどいい…