I am participating in a workshop , where we need to automatically rig characters . Perhaps , we will use deep learning methods . The task is to recognize body parts . My question : Is there a way for connecting tensorflow and keras , or other neural networks with 3D software?
For blender you can follow this tutorial,
https://www.youtube.com/watch?v=J7Iu1rfwbds
I tested it in Blender 2.81 and Python 3.7 by importing pytorch, opencv, sklearn etc. Also the test code provided in the video works correctly. You do not need follow the pandas installation and git cloning shown on the tutorial. Let it install with other bigger packages or install with conda.
Conda environment creation, https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html.
conda create -n MyNamedEnv python=3.7
After environment is created install your required packages. If you have multiple environments its usually in Anaconda3/envs folder. Command to make link,
mklink /j python C:\Users\computer\Anaconda3\envs\MyNamedEnv
To test if it is working go to scripting tab in blender 2.81 delete everything. A to select all and del button to delete. Paste code from below to Text Editor and run script.
https://github.com/virtualdvid/MachineLearning/blob/master/blender/iris_blender.py
Tensorflow and keras should work similarly by installing them in the conda environment and calling them from blender.
Related
I followed the instructions on the official website to download the TensorFlow. I chose to create a virtual environment as the instruction shown for macOS. My question is that if I need to activate the virtual environment each time before I use TensorFlow?
For example, I want to use tensor flow on Jupiter notebook and that means I need to install Jupiter and other required packages like Seaborn/pandas as well on the virtual environment. However I already downloaded anaconda and basically, it has all the packages I need.
Besides, will it make a difference if I download it with conda?
Well, if you downloaded the packages (like you said TensorFlow and Seaborn) in the base Conda environment which is the default environment that anaconda provides on installation, then to use what it has, you need to run whatever program/IDE like Jupyter lab from it. So you would open Anaconda Prompt and then type in jupyter lab and it would open up a new socket and you can edit with your installed python libraries from Conda.
Otherwise in IDE's VSCode you can simply set the python interpreter to that from Conda.
However, if you install the libraries and packages you need using pip on your actual python installation not Conda, then there is no need for any activation. Everything will run right out of the box. You don't need to select the interpreter in IDE's like VSCode.
Bottom line, if you know what libraries you need and don't mind running pip install package-name every time you need a package, stick with pip.
If you don't like to that sort of 'low level' stuff then use Anaconda or Miniconda.
Attempting to run tensorflow a Mac, using python 3.7 as well as PyCharm and receiving where module tensorflow has no attribute app, at the following.
I've run through a number of potential solutions. Following the instructions provided on this question: Installing tensorflow on Pycharm (Mac). I've managed to successfully create a virtual-env in which I installed the tensorflow package however this folder contains
nothing but the init.py and pycache and the error remains.
I've also tried copying the contents of the tensorflow GitHub repo directly into this folder but it results in an ImportError.
Not sure what the issue is. Should I switch to python 2.7?
Python 3.7 is still unsupported as of this moment by tensorflow.
I'm trying to convert a model from tensorflow to onnx. The process to do this is like following.
Save a graph_def and a ckpt for weights in tensorflow.
Inspect a graph_def whether it's structure is valid and give us what the inputs and outputs are.
Freeze both of them together into frozen tensorflow graph.
Convert that graph to onnx model.
The problem is in step 2. To inspect the graph definition, I tried to invoke summarize_graph in Graph Transform Tool. But, it wasn't work properly. Next, i found documentation for Graph Transform Tool. According to the documentation they use bazel that is a tool to build and test like maven. It means that I cannot use this function in a tensorflow installed from pip package manager? Only way to use this function is to install a tensorflow from source and build with bazel?
You should be perfectly able to use these features installing TensorFlow from pip. Bazel is used to manage build procedures, you don't need It unless you want to compile TensorFlow from source by yourself.
Try to remove It and reinstall from pip paying attention to choose the right Python setup in case you have multiple Python distributions on your machine.
I can't seem to find any documentation that describes what parts of TF and TFS need to be installesd/built to create a servable, can anyone shed light on the subject?
I'm not sure if this documentation exists. The approach I would take is to create a new blank environment, on conda or whatever you prefer. Then install Tensorflow and Tensorflow serving into the environment, which will prompt you to install the dependencies into the environment as well.
Then just to pip list or conda list (or equivalent) and see what all libraries got installed. That should give you a list of the base libraries needed to use TF and TF Serving.
A screen shot of my problem
I have been trying to install Keras for about a week now. I installed Anaconda and then Tensorflow with Python3.5 and Jupyter. When I start up with the Anaconda3 prompt it always gives me the message
>was unexpected at this time
C:\Users\Ray Van>#IF NOT "==" #chcp > NUL
C:\Users\Ray Van>
I used to be able to just say
Jupyter Notebook but it doesn't like this
Also I want to say activate tensorflow and then say jupyter notebook and then run a Python program with Keras (for Neural networks) but no matter what I tried, nothing works. I read somewhere that having the blank in the name \Ray Van] can be a problem but I didn't set that up. Somehow it was just set up by Windows 10 and from reading various posts, it seem very difficult to change without risking having to install Windows10 again. Various places say that it is very easy to install Keras, but I have found the opposite after trying several days for 3 hours at a time. But I am not good at installing things like this and don't really understand how all the things are connected. Maybe I have to start over and install Anaconda and then tensorflow and then from within the tensorflow environment install Keras and Jupyter. I know the pip command or the conda command are used for this but I don't really understand that either. So a total newbie who just wants to run some Python programs for my Neural Network research using Keras.