简体   繁体   English

使用 Python、Tensorflow 进行图像分类

[英]Image Classification with Python, Tensorflow

How to perform Image classification.如何执行图像分类。 Get Breakhis data set and classify malignant vs benign using deep learning.获取 Breakhis 数据集并使用深度学习对恶性与良性进行分类。
I have to use just Python and Tensorflow.我必须只使用 Python 和 Tensorflow。 I need to write code for data set splitting, for preprocessing and training, and for creating a prediction on a test image.我需要编写用于数据集拆分、预处理和训练以及在测试图像上创建预测的代码。 How to start and how to code?如何开始以及如何编码?

I was pretty much in your same condition like a week ago, so here i go.我和一周前的情况几乎一样,所以我走了。

  1. Prepare some coffee准备一些咖啡
  2. You might want to get everything running and ready to work first.您可能希望先让一切运行起来并准备好开始工作。 Start by having a good python 3.x or 2.7 enviroment, I personally recommend Anaconda since it has lots of useful packages you might need.首先要有一个好的 python 3.x 或 2.7 环境,我个人推荐 Anaconda,因为它有很多你可能需要的有用包。 After that you want to have Tensorflow up and running, have a look at Tensorflow Instalation guide , but don't install it yet, just the requirements like CUDA if you're willing to use tensorflow with the processing power of a Nvidia GPU.之后,您想要启动并运行 Tensorflow,请查看Tensorflow 安装指南,但不要安装它,如果您愿意使用具有 Nvidia GPU 处理能力的 tensorflow,只需安装CUDA之类的要求。
  3. When you have all set to install tensorflow, just create a virtual enviroment where you like the most with当你准备好安装 tensorflow 后,只需创建一个你最喜欢的虚拟环境

    conda create -n <myenv> python=xx

where xx is the python version you are willing to use, and is the name of your enviroment (Take it as your workshop, with all the tools you need, and where you can make a mess without damaging your computer).其中 xx 是您愿意使用的 python 版本,并且是您的环境名称(将其作为您的工作室,其中包含您需要的所有工具,并且可以在不损坏计算机的情况下弄得一团糟)。 After that you can install Tensorflow and maybe Keras (a usefull python module that works on neural networks with Tensorflow as a backend) with pip install --upgrade tensorflow-gpu and pip install keras .之后,您可以使用pip install --upgrade tensorflow-gpupip install keras安装 Tensorflow 和 Keras(一个有用的 Python 模块,可在以 Tensorflow 作为后端的神经网络上工作)。 or maybe use pip3 if you're willing to use python 3.x.或者如果您愿意使用 python 3.x,也可以使用pip3

After this all you have to do is read and read, start from the basics, look forward to create your first neural network and so on.在此之后,您所要做的就是阅读和阅读,从基础开始,期待创建您的第一个神经网络等等。

You can visit this blog to understand basic Image Classification using TensorFlow in Python: 您可以访问此博客以在Python中使用TensorFlow了解基本的图像分类:

https://medium.com/data-science-everywhere/mnist-image-classification-using-tensorflow-29c5e48a747d https://medium.com/data-science-everywhere/mnist-image-classification-using-tensorflow-29c5e48a747d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM