Python

Thumbnail of post image 189

models = for BenchmarkModel in models: runs = [] model_name = BenchmarkModel.__name__.replace('Model', '')

Python,効率化

Thumbnail of post image 189

Pythonを実行する際の引数指定は,以下のようにyamlで行うのが効率が良いとされている.

# yamlファイルの準備(ここは普通手動で行う)content = "batch_size: 16\nwidth: 224\nhei ...

Error,Python

Thumbnail of post image 163

タイトルのエラーがでたときは、urllib.requestを代わりに使おう

import urllib.requestreq = urllib.request.urlopen("")

OpenCV,Python

Thumbnail of post image 159

以下コマンドを入力後再度opencvのインストールコマンドを入力

conda install anacondaconda update --all

albumentation,Python

Thumbnail of post image 143

Albumentationを用いてSegmentation用のコードを書いていると,条件を変えた複数の入力画像を同時にtransformしたくなる時がある.しかしながら,albumentationでは,transformの際,imag ...

OpenCV,Python

Thumbnail of post image 122

画像から特定の画素を抽出する方法として,inRange関数を使う方法が良く取り上げられるが,RGB値で色を指定したり,複雑な条件を付けて画素抽出を行う場合はNumpyによる行列操作で抽出するのが最も良い方法なのではないかと思う.

Jupyter,Python

Thumbnail of post image 001

Dockerでjupyter notebookを動かすときには,単に,jupyter notebookと打つのではなく,少々設定が必要である.

まずは設定ファイルを作成

jupyter notebook --gene ...

Deep Learning,Docker,Nvidia-docker,Python

Thumbnail of post image 006

単眼画像からの深度測定のために提案されたPackNet-Sfmをインストールするときは,dockerが推奨されている.公式のリポジトリでは,親切にmakeコマンドでdockerコンテナを構築するまでを1つのパイプラインで行うことができ ...

Jupyter,Python

Thumbnail of post image 152
from IPython.display import display, Markdown, Latexdisplay(Markdown('*some markdown* $\phi$'))display(Latex('\phi'))x = ...

Pandas,Python

Thumbnail of post image 086
# 列名のみのデータフレーム作成df = pd.DataFrame({'person':,\ 'name':,\ 'num':}) person name num0 a aa 1001 b bb 2002 c cc 3003 a aaa 1 ...