9
12

More than 1 year has passed since last update.

セグメンテーションの神ソフト「EIseg」をubuntu20でインストールするまで。

Last updated at Posted at 2022-06-26

1.セグメンテーション「EIseg」とは
GitHub https://github.com/PaddleCV-SIG/EISeg
141130688-e1529c27-aba8-4bf7-aad8-dda49808c5c7 (1).gif

どうやら、クリックだけでセグメンテーションが可能らしい。
手でやるセグメンテーションは地獄なので、なんてありがたい。
しかし、インストールまで1日を要したのでUbuntuでのハマりポイントをここに記します。

2 導入
最初の環境
-Ubuntu22.04 
-Python 3.10.4
-venv で仮想環境を構築
まず、Ubuntu22で導入を試みました。
謎のエラーが出てどうにも無理でした。 

3 再導入
Ubuntu22は公式でも動作確認してないので、あきらめてUbuntu20で
環境
-Ubuntu20.04 
-Python 3.8.10

-venv で仮想環境を構築

python3 -m venv venv
. venv/bin/activate

公式では、pipで入るらしいので。

pip install eiseg
eiseg
ModuleNotFoundError: No module named 'paddle'

paddleがないらしい、正式にはPaddlePaddle

pip install PaddlePaddle

入りました。versionは2.3.0、推奨は> = 2.2.0なのでOKかな
これでどうだ、ところが、

eiseg
「TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates」

どうもprotocのバージョンが高すぎる様子
そこで、動作するバージョンが確認できたversion=3.18.1 があるよう
(もっといいのがあるかもしれません)。

pip install protobuf==3.18.1
eiseg

起動しました。
モデルを読み込ませて、ポチポチするだけで、
Screenshot from 2022-06-26 13-00-56.png

できました。
Dokker使ってもいいんだろうけど。

OSの変更疲れた。

参考記事
・EISeg
 https://github.com/PaddleCV-SIG/EISeg/blob/develop/README_EN.md
・AIを使った自動セグメンテーションマスクツール「EISeg」のセットアップ方法
 karaage0703
 https://zenn.dev/karaage0703/articles/1ba7411080e9c5
・たった数クリックでセグメンテーションのマスクを作る!? Edge Flowの紹介 
 @koshian2 
 https://qiita.com/koshian2/items/8beab322ff20228658d8
・Windows10 AnacondaでEISegを導入してアノテーション 
 https://circleken.net/2022/01/post78/

 

9
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
12