Show and Tell realtime detection with webcamera based on "run_inference.py".
- OpenCV
- to use cv2.VideoCapture()
-
Clone this repository.
-
Copy "im2txt" folder and "process_camera.sh" to "~/models/research/im2txt".
-
Open "~/models/research/im2txt/im2txt/BUILD" and add this comment.
py_binary(
name = "run_inference_camera",
srcs = ["run_inference_camera.py"],
srcs_version = "PY2AND3",
deps = [
":configuration",
":inference_wrapper",
"//im2txt/inference_utils:caption_generator",
"//im2txt/inference_utils:vocabulary",
],
)
- Run this command at "~/models/research/im2txt".
bazel build -c opt //im2txt:run_inference_camera
- Open "process_camera.sh" and edit line to your path.
--checkpoint_path="${HOME}/im2txt/model/train" \
--vocab_file="${HOME}/im2txt/data/mscoco/word_counts.txt" \
- Run this command at "~/models/research/im2txt".
chmod +x process_camera.sh
- Now you can run.
./process_camera.sh
I can answer questions in English or Japanese.
日本語の質問でも大丈夫ですよ!