【目次】
BASNet は, ディープラーニングにより,Salient Object Detection (顕著オブジェクトの検出)を行う一手法.2019年発表.
BASNet は次の2つのモジュールから構成される
【文献】
Qin, Xuebin and Zhang, Zichen and Huang, Chenyang and Gao, Chao and Dehghan, Masood and Jagersand, Martin, BASNet: Boundary-Aware Salient Object Detection, The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019
【関連する外部ページ】
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での Python 3.10,関連パッケージ,Python 開発環境のインストール: 別ページ »で説明
【サイト内の関連ページ】
Python のまとめ: 別ページ »にまとめ
【関連する外部ページ】
Python の公式ページ: https://www.python.org/
Windows での Build Tools for Visual Studio 2022,NVIDIA ドライバ,NVIDIA CUDA ツールキット 11.8,NVIDIA cuDNN v8.6 のインストールと動作確認: 別ページ »で説明
【関連する外部ページ】
コマンドプロンプトを管理者として実行: 別ページ »で説明
PyTorch のページ: https://pytorch.org/index.html
次のコマンドは, PyTorch 2.0 (NVIDIA CUDA 11.8 用) をインストールする. 事前に NVIDIA CUDA のバージョンを確認しておくこと(ここでは,NVIDIA CUDA ツールキット 11.8 が前もってインストール済みであるとする).
python -m pip install -U pip python -m pip install -U torch torchvision torchaudio numpy numba --index-url https://download.pytorch.org/whl/cu118 python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
コマンドプロンプトを管理者として実行: 別ページ »で説明
cd %HOMEPATH% rmdir /s /q BASNet git clone https://github.com/NathanUA/BASNet.git
公式ページ https://github.com/xuebinqin/BASNet の指示による. 学習済みモデル(ファイル名 basenet.pth)は,次で公開されている. ダウンロードし,saved_models/basnet_bsi の下に置く
https://drive.google.com/open?id=1s52ek_4YTDRt_EOkx1FS53u-vJa0c4nu
cd %HOMEPATH% cd BASNet cd test_data\test_images curl -L https://github.com/opencv/opencv/blob/master/samples/data/fruits.jpg?raw=true -o fruits.jpg curl -L https://github.com/opencv/opencv/blob/master/samples/data/home.jpg?raw=true -o home.jpg curl -L https://github.com/opencv/opencv/blob/master/samples/data/squirrel_cls.jpg?raw=true -o squirrel_cls.jpg
fruits.jpg home.jpg squirrel_cls.jpg
cd %HOMEPATH% cd BASNet python basnet_test.py