前提・実現したいこと
tensorflow(tf-openpose)で画像から骨格推定をしようとしています。
Qiita記事に従って環境構築と実行をしました。
発生している問題・エラーメッセージ
最後に実行しようとすると解像度に関するエラーが出ましたが、実行するためにどのように修正すればいいか検討がつかないです。
usage: run.py [-h] [--image IMAGE] [--model MODEL] [--resize RESIZE] [--resize-out-ratio RESIZE_OUT_RATIO] run.py: error: unrecognized arguments: --resolution=432x368 An exception has occurred, use %tb to see the full traceback.
%tb
で詳細を確認したところ以下のようになりました。
--------------------------------------------------------------------------- SystemExit Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/IPython/utils/py3compat.py in execfile(fname, glob, loc, compiler) 184 with open(fname, 'rb') as f: 185 compiler = compiler or compile --> 186 exec(compiler(f.read(), fname, 'exec'), glob, loc) 187 188 # Refactor print statements in doctests. /content/tf-pose-estimation/run.py in <module>() 29 help='if provided, resize heatmaps before they are post-processed. default=1.0') 30 ---> 31 args = parser.parse_args() 32 33 w, h = model_wh(args.resize) /usr/lib/python3.6/argparse.py in parse_args(self, args, namespace) 1744 if argv: 1745 msg = _('unrecognized arguments: %s') -> 1746 self.error(msg % ' '.join(argv)) 1747 return args 1748 /usr/lib/python3.6/argparse.py in error(self, message) 2400 self.print_usage(_sys.stderr) 2401 args = {'prog': self.prog, 'message': message} -> 2402 self.exit(2, _('%(prog)s: error: %(message)s\n') % args) /usr/lib/python3.6/argparse.py in exit(self, status, message) 2387 if message: 2388 self._print_message(message, _sys.stderr) -> 2389 _sys.exit(status) 2390 2391 def error(self, message):
該当のソースコード
bash
1%run -i run.py --model=mobilenet_thin --resolution=432x368 --image=/content/tf-pose-estimation/models/graph/cmu/150415022548_TP_V.jpg
補足情報(FW/ツールのバージョンなど)
Qiita記事のコードとちがう点は2点あります。
①実行時の1行前のパスが環境構築時からファイルに村祭していなかったことです。
bash
1%cd /content/tf-pose-estimation/src
[Errno 2] No such file or directory: '/content/tf-pose-estimation/src' /content/tf-pose-estimation
② 画像はwgetではなく、パス/content/tf-pose-estimation/models/graph/cmu/
下に直接アップロードしました。
あなたの回答
tips
プレビュー