First of all, i reflashed my Jetson TX2 with JetPack 3.3. I confirmed everything is working fine by running the samples after.
I work in a gold mining company and im trying to showcase an experiment to sort ore rocks i made on my workstation where I use windows 10 and used Tensorflow on a quadro and was able to make it work.
Now, i want to inference it and thats why we bought a Jetson TX2. However, there is a serious lack of documentation on how to transfer a Tensorflow model to Tensor RT. I spent HOURS searching for a clue and i found the nvidia developer video who talked about ONNX. Great! So i tried however the frontpage of the Tensorflow webpage and the tutorials are asking to use Keras model = sequential() etc
However your video shows to freeze a graph and use that for TensorRT to optimze. This is failure point 1: There is no documentation on what we should do with a model that doesnt explicitly use a TensorFlow Session… what do we freeze??
Ok so we move forward by ignoring the whole TensorRT part and basically we should be able to playback at decent speed using TensorFlow-GPU at least the same idea i used on my quadro.
I created an image classifier CNN using TensorFlow and trained it got it to save the weights after training an load the weights when i need to use it, on my quadro. Now I want to do the inference on the Jetson TX2…
Problem #1: Python 3 is completely useless on the JetsonTX2. I cannot use OpenCV i see it installed and Python 2.7 which was also preinstalled finds it no problem. I cannot find how to bind python3 to opencv.
After HOURS wasted, i give up on pthon 3 and instead try python 2.7… Now i have to install TensorFlow-GPU and some other things… no problem! However it is impossible to install keras!
it keeps failing to find some wheel file and throws this:
Failed building wheel for h5py
Running setup.py clean for h5py
Successfully built pyyaml
Failed to build scipy h5py
Installing collected packages: scipy, six, numpy, keras-preprocessing, pyyaml, h5py, keras-applications, keras
Running setup.py install for scipy … error
then at the end it throws this:
config = setup_module.configuration(*args)
File “scipy/linalg/setup.py”, line 19, in configuration
raise NotFoundError(‘no lapack/blas resources found’)
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Command “/usr/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-KmHg_7/scipy/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-scg9OB-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-KmHg_7/scipy/
I cannot get even the basic Tensorflow to work!!!
I know i can use Tensorflow without Keras, but TensorFlow themselves are suggesting to use Keras and all tutorials are using keras so i really need to get this last step going otherwise the whole point of this kit is not worth it!
I tried to upgrade setuptools and pip and everything i found on the internet.,
why isnt this packaged with JetPack3.3??
I am not a unix expert but i have some decent knowledge. However we are a mining company and we dont use linux… we are also not a technology company, we dont have a team of unix sysadmins. we cant be wasting time on setting the thing up and having so many issues getting a basic experiment to work…
The whole point of JetPack and Jetson was to make it easy for us, one guy developers, to bring solution to problems without having to recompile ubuntu
I’m trying my best to try bring edge computing to mining, people are excited about it but so far the JetsonTX2 has been a failure for us due to the lack of documentation, support, clear examples, instructions, staying up to date with their partner TensorFlow, and setup issues i have outlined in here.
Is there anything I can do to fix this before i just discard the whole idea of edge computing?
Take the example of tensorflow tutorials homepage:
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(512, activation=tf.nn.relu),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation=tf.nn.softmax)
])
model.compile(optimizer=‘adam’,
loss=‘sparse_categorical_crossentropy’,
metrics=[‘accuracy’])
model.fit(x_train, y_train, epochs=5)
model.evaluate(x_test, y_test)
How do i convert this to TensorRT so i dont have to suffer through installing keras etc?
Thank you and I hope that somebody at NVIDIA takes these seriously because this is a game breaker for us as it makes support impossible!