Feel free to contact him if you have any questions!
bigballon / cpp-call-tensorflow Goto Github PK
View Code? Open in Web Editor NEWCalling (TensorFlow) Python Program from C++
Calling (TensorFlow) Python Program from C++
2019-10-09 15:34:39.639912: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-10-09 15:34:39.660809: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2208000000 Hz
2019-10-09 15:34:39.662611: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5476150 executing computations on platform Host. Devices:
2019-10-09 15:34:39.662653: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
2019-10-09 15:34:39.701288: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-10-09 15:34:39.749578: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
2019-10-09 15:34:39.922100: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
2019-10-09 15:34:40.130052: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
Please input picture file to predict: test_pic/cat.jpeg
test_pic/cat.jpeg
float() argument must be a string or a number, not '_ImageCrop'
Test with tensorflow 1.14 python 3.5
Error: print the image name as result for prediction! Print expection: float() argument must be a string or a number, not '_ImageCrop'
Dear Mr Wei Li(Lee);
i would like to ask you if it is possible to add a function to convert cv::mat to numpy and path this numpy variable to a python script, and then return the output to cpp code.
i tried using this link https://github.com/yati-sagade/opencv-ndarray-conversion for converting the formate between cpp and python, but it seems it will take a long time.
thanks in advance
Hi,
i became the following error:
./classifier
Using TensorFlow backend.
Can't find Module
Traceback (most recent call last):
File "./vgg_model.py", line 4, in <module>
import keras
File "/usr/local/lib/python3.5/dist-packages/keras/__init__.py", line 3, in <module>
from . import utils
File "/usr/local/lib/python3.5/dist-packages/keras/utils/__init__.py", line 6, in <module>
from . import conv_utils
File "/usr/local/lib/python3.5/dist-packages/keras/utils/conv_utils.py", line 9, in <module>
from .. import backend as K
File "/usr/local/lib/python3.5/dist-packages/keras/backend/__init__.py", line 1, in <module>
from .load_backend import epsilon
File "/usr/local/lib/python3.5/dist-packages/keras/backend/load_backend.py", line 90, in <module>
from .tensorflow_backend import *
File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 5, in <module>
import tensorflow as tf
ImportError: No module named 'tensorflow'
Tensorflow and Keras are installed! The script vgg_model.py are works successfull and get me the prediction!! How can I solve this??
could you please give me some hints to write Cmake file, because I want to integrate this into my master project.
thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.