Until you can do simple image recognition with Jupyter

at first

Suddenly I wanted to make an image discrimination application, so first I used jupyter in the Window environment I tried to make a program that easily distinguishes images.

Development environment OS: Windows10 Home GPU: Geforce GTX1660Ti Anaconda: 4.8.2

Various installations

First, download and install Anaconda from the following site https://www.anaconda.com/products/individual

Next, we will introduce TensorFlow, which is a library required for image recognition.

Before that, since the PC I'm using now has a GPU, I'd like to use the GPU for calculation. However, it seems that you need to install the Nvidia driver, CUDA and cuDNN, and these tools are not always up to date and the GPU will not recognize you unless you are careful about the version ...

So, first of all, search for your GPU from the following site and download and install the Nvidia driver https://www.nvidia.co.jp/Download/index.aspx?lang=jp I'm not sure about the download type, but I chose the Game Ready driver. It was version 445.87 when I installed it.

As I wrote earlier, it is necessary to install while paying attention to the correspondence of each version, so see the correspondence table on this site Nvidia driver version ⇒ Install the corresponding CUDA ⇒ Download the corresponding cuDNN Page with correspondence table https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html https://www.tensorflow.org/install/source_windows download page CUDA: https://developer.nvidia.com/cuda-downloads cuDNN: https://developer.nvidia.com/cudnn-download-survey In my case, the CUDA version was 10.0.130 and the cuDNN was 7.4.2 for CUDA 10.0.

After installation, do the following: -All the data in the downloaded cudnn folder Copy to C: \ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v10.0

・ In system environment variables Variable name: CUDNN_PATH Value: "C: \ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v10.0" Is newly added

Now that the necessary installation on the GPU side is complete, install the TensorFlow library at the end. First, create a separate environment for TensorFlow on Anaconda.

conda create -n tf37 python=3.7 anaconda
conda activate tf37

In that environment Install tensorflow

conda install tensorflow-gpu==2.0.0

Finally, run the command on python and check that the GPU is recognized properly.

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

キャプチャ.png

This completes various installations and you can use TensorFlow.

I stumbled a little below

At first, I used pip to install by relying on other articles, but when I used tensorflow, I got the following error. キャプチャ3_2.PNG Probably, when using it with jupyter etc., it seems to be useless unless it is installed with conda.

Recommended Posts

Until you can do simple image recognition with Jupyter
I tried simple image recognition with Jupyter
Until you start Jupyter with Docker
Python | What you can do with Python
What you can do with API vol.1
What you can do with programming skills
Until you can use opencv with python
Do image recognition with Caffe model Chainer Yo!
You can now display slides with nbviewer! [Jupyter]
Image recognition with keras
What you can and cannot do with Tensorflow 2.x
Image recognition with Keras + OpenCV
Until you can install your own Python library with pip
What you can do with the Python standard library statistics
Consider what you can do with Python from the Qiita article
Let's do image scraping with Python
Until you run python with apache
Until you shake ruby with renpy
You can do it with Python! Structural analysis of two-dimensional colloidal crystals
Note until you use emacs with WSL
Until you can read the error log
You can use Dash on Jupyter jupyter_dash
You will be an engineer in 100 days --Day 35 --Python --What you can do with Python
If you guys in the scope kitchen can do it with a margin ~ ♪
Image recognition
I tried to make a simple image recognition API with Fast API and Tensorflow
Until you CI what you made with Django with Jenkins
Until youtube-dl can be used with Synology (DS120j)
I tried image recognition of CIFAR-10 with Keras-Learning-
I tried image recognition of CIFAR-10 with Keras-Image recognition-
Until you use the Kaggle API with Colab
Can you challenge Kaggle with just your iPad?
You can manage overlapping characters with multiple plt.text.
You can easily create a GUI with Python
Until you can use the Google Speech API
I tried simple image processing with Google Colaboratory.
Consideration when you can do a good job in 10 years with Python3 and Scala3.
Until you can install blender and run it with python for the time being
What to do if you get an Import Error when importing matplotlib with Jupyter