日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

caffe web demo 搭建

發布時間:2025/7/25 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 caffe web demo 搭建 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Web Demo

需要的條件

demo 需要Python支持和一些依賴,確保已經安裝依賴,運行: pip install -r examples/web_demo/requirements.txt, 并確定已經編譯了Python Caffe并且包含在PYTHONPATH 中(seeinstallation instructions).

確保已經下載了 Reference CaffeNet Model 和 the ImageNet Auxiliary Data:

./scripts/download_model_binary.py models/bvlc_reference_caffenet ./data/ilsvrc12/get_ilsvrc_aux.sh

NOTE: 如果運行有問題,請嘗試重新下載auxiliary files.

運行

執行 python examples/web_demo/app.py 將會啟動demo服務, 本機訪問地址http://0.0.0.0:5000.可以開啟web server的debug模式 , 或者改變端口號:

% python examples/web_demo/app.py -h Usage: app.py [options]Options:-h, --help show this help message and exit-d, --debug enable debug mode-p PORT, --port=PORT which port to serve content on

“maximally accurate” 結果如何產生?

In a nutshell: ImageNet predictions are made at the leaf nodes, but the organization of the project allows leaf nodes to be united via more general parent nodes, with ‘entity’ at the very top.To give “maximally accurate” results, we “back off” from maximally specific predictions to maintain a high accuracy.The bet_file that is loaded in the demo provides the graph structure and names of all relevant ImageNet nodes as well as measures of information gain between them.Please see the “Hedging your bets” paper fromCVPR 2012 for further information.


界面展示









問題和解決

1 問題

Traceback (most recent call last):
? File "./scripts/download_model_binary.py", line 5, in <module>
??? import yaml
ImportError: No module named yaml


解決:sudo apt-get install python-yaml


2 問題

python examples/web_demo/app.py
Traceback (most recent call last):
? File "examples/web_demo/app.py", line 6, in <module>
??? import flask
ImportError: No module named flask

解決:sudo apt-get install python-flask


3 問題

Traceback (most recent call last):
? File "examples/web_demo/app.py", line 9, in <module>
??? import tornado.wsgi
ImportError: No module named tornado.wsgi


解決:sudo apt-get install python-tornado


4 問題

Traceback (most recent call last):
? File "examples/web_demo/app.py", line 12, in <module>
??? import pandas as pd
ImportError: No module named pandas


解決:sudo apt-get install python-pandas


5 問題

Traceback (most recent call last):
? File "examples/web_demo/app.py", line 18, in <module>
??? import caffe
ImportError: No module named caffe

解決: 

 pls import caffe in $CAFFE/python or add the path to sys.path





總結

以上是生活随笔為你收集整理的caffe web demo 搭建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。