RandomForestsによるエッジ検出アルゴリズムStructuredForestsの適用方法です.Gitからコード一式を落としてくるところまではOK,それ以降のデータセットの入手と環境構築で詰まったので解決のメモを残します.
*****
環境
- ubuntu 16.04LTS
- python2.7系のvirtualenv環境を作成済み
手順
-
cd StructuredForests
-
vim StructuredForests.py
-
コード末尾の”toy”とある箇所(2か所)を”BSR”に変更
-
n_pos, n_negのデフォルト値10000をそれぞれ500000にする.
-
-
pip install tables opencv-python scipy scikit-image scikit-learn cython
-
mv model model.old #学習済みモデルを退避
-
git clone https://github.com/BIDS/BSDS500 #BSDS500の公式サイトが不調でダウンロードできない.githubに複製してくれている神リポジトリから取得する.
-
mv BSDS500 BSR
- python StructuredForests.py
結果確認
edgeフォルダにエッジ抽出結果が保存されている.
コメント