はじめに
pip install -r requirements.txt
などと一気にライブラリのインストールをしていると、どのライブラリが何のために使われているのかを無自覚になってしまいがち。
そこで、最近使っているrepository の中の依存ライブラリを調べてみた。
想定する読者
- 3Dカメラで取得したdepth(深度)を改善することに関心のある人
(日本の中に何人いるんだ? ほぼ俺得)
EXR 画像ファイルの読み書き用のライブラリ
画像のbit幅が8bitには収まらないような画像を扱うためのファイル形式のライブラリ
OpenEXRとは
画像ファイルの拡張子は.exrとなります。
apt install -y openexr
pip install OpenEXR
pip install pyexr
viewをインストールする。
apt install -y openexr-viewer
open3d
3Dの点群データを扱うためのライブラリ
open3d はcudaをサポートしている。
open3d.cuda.is_available
ARM support
Open3Dは、LinuxとmacOS (Apple Silicon)で64ビットARMアーキテクチャ(arm64またはaarch64)を実験的にサポートしています。Open3D 0.14から、LinuxとmacOS用にコンパイル済みのARM64 wheelを提供します。
pip install open3d
- 備忘録:Open3DとPythonで点群を取得・表示する【Linux】
- Open3Dの使い方:複数の点群を位置合わせするGlobal Optimization
- OpenVINOとOpen3Dを用いて、CPUで入力動画から3次元復元する
Transforms3d
This package is a collection of Python functions and classes to create and convert 3-dimensional transformations such as rotations, zooms, shears and reflections.
pip install transforms3d
h5py
バイナリーデータファイルのフォーマット HDF を扱う Python ライブラリ
https://docs.h5py.org/en/stable/
pip install h5py
imageio
imageio.imread()
imageio.imwrite()
するためのライブラリ
pip install imageio
-
import cv2
してるけど、本当にcv2を使う必要ある?
アルゴリズムの多くが、OpenCV以外のところで開発されているのを使っていると、
実は、入出力くらいにしかOpenCVを使っていないことに気づいてしまった。
imageio.imread()
https://imageio.readthedocs.io/en/v2.16.1/_autosummary/imageio.imread.html
imageio.imwrite()
https://imageio.readthedocs.io/en/v2.11.0/reference/_core_29/imageio.imwrite.html
matplotlib を使っていると
plt.imshow()を使うことで、cv2.imshow() さえ出番がない。
imgaug
Image augmentation for machine learning experiments.
機械学習のために画像データのaugmentationを実行するライブラリ
shapely
https://pypi.org/project/shapely/
Manipulation and analysis of geometric objects in the Cartesian plane.
pip install shapely
tqdm
プログレスバーを表示させるためのライブラリ
pip install tqdm