[1]:https://github.com/carefree0910/ImageRecognition/tree/master
[2]:https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip "Inception-v3"
# Image Recognition
Dependency: numpy, matplotlib, Tensorflow, cv2(For visualization)
A Stand-alone version for this project can be found [here][1]
+ Inception-v3 model for this project can be downloaded [here][2]
+ Extract the zipped file and put Inception-v3 model (which should be renamed from 'tensorflow_inception_graph.pb' to 'Model.pb') to 'Models/Extractor/v3' folder
+ Put your training set **FOLDERS** into '_Data' folder, please use English names for your folders to ensure that cv2 works correctly
+ Each folder name should be treated as the 'label' of the pictures contained in the folder
+ Put your test set **PICTURES** into 'Test' folder
+ If possible, put a **ONE-HOT** answer naming '_answer.npy' into 'Test' folder as well for better visualization
+ If you don't want to struggle for these, just leave 'Test' folder empty (Reference the Notice below)
+ Run 'Main.py'!
+ Run 'Main.py' in PyCharm will be perfectly correct. If you want to run it by double-clicking, some import statements may need to be modified
+ You may want a [Stand-alone version][1] for this project, where you can run it by double-clicking 'Main.py' without modifying any import statement!
## Notice That:
+ If 'Test' folder remains empty when the program is running, `min(196, 0.2 * n_data)`pictures will be **MOVED** from '_Data' folder to 'Test' folder if 'gen_test' FLAG is True
+ An '_answer.npy' ndarray will also be generated automatically!
+ After processing all images in '_Data' folder, a '_Cache' folder which contains 'features.npy' and 'labels.npy' (shuffled) will be generated
+ If you want to train on new dataset, '_Cache' folder should be deleted
+ You can train your own classifier using 'features.npy' and 'labels.npy'
+ After the program is done, a Predictor will be stored in 'Models/Predictors/v3' folder. If you want to train on new dataset, this folder should be deleted
--args:
parser.add_argument(
"--gen_test",
type=bool,
default=True,
help="Whether generate test images"
)
parser.add_argument(
"--images_dir",
type=str,
default="Test",
help="Path to test set"
)
parser.add_argument(
"--extract_only",
type=bool,
default=False,
help="Whether extract features only"
)
parser.add_argument(
"--visualize_only",
type=bool,
default=False,
help="Whether visualize only"
)
parser.add_argument(
"--overview",
type=bool,
default=True,
help="Whether use cv2 to overview"
)
## Visualization
![image](http://i1.piimg.com/567571/663724d1c2d0c997.png)
![image](http://i1.piimg.com/567571/f253925c8122775a.png)
*(Not so elegant, but (maybe) better than nothing...)*
没有合适的资源?快使用搜索试试~ 我知道了~
python 与机器学习实战, 修订源码,python3
共218个文件
py:154个
txt:16个
md:14个
需积分: 9 0 下载量 160 浏览量
2022-10-25
19:52:51
上传
评论
收藏 6.9MB ZIP 举报
温馨提示
python 与机器学习实战, 修订源码,python3
资源推荐
资源详情
资源评论
收起资源包目录
python 与机器学习实战, 修订源码,python3 (218个子文件)
train.csv 2.75MB
test.csv 313KB
dic.dat 15KB
backup.dat 15KB
dic.dat 2KB
backup.dat 2KB
dic.dat 917B
backup.dat 917B
dic.dat 42B
.DS_Store 6KB
.gitignore 1KB
BasicNN.ipynb 907KB
LinearSVM.ipynb 410KB
Kernel Methods.ipynb 192KB
MLP.ipynb 136KB
AdvancedNN.ipynb 93KB
NaiveBayes2NN.ipynb 83KB
Perceptron.ipynb 72KB
DTree2NN.ipynb 67KB
NN.ipynb 51KB
Basic.ipynb 11KB
CNN.ipynb 9KB
Introduction.ipynb 8KB
TraditionalML.ipynb 3KB
LICENSE 1KB
README.md 3KB
README.md 2KB
README.md 2KB
README.md 1KB
README.md 1008B
README.md 884B
README.md 735B
README.md 729B
README.md 423B
README.md 332B
README.md 229B
README.md 112B
README.md 111B
README.md 87B
LABEL_DIC.npy 80B
Put v3 Extractor here as 'Model.pb' 0B
logo.png 921B
search.png 612B
confirm.png 235B
del.png 198B
Put testing pictures here 0B
Put Training Dataset FOLDERS here 0B
Put Training Dataset FOLDERS here 0B
DistBase.py 89KB
Base.py 62KB
Networks.py 48KB
Base.py 41KB
Bases.py 38KB
pycmd.py 36KB
Networks.py 35KB
Networks.py 33KB
NNUtil.py 31KB
Networks.py 31KB
Layers.py 30KB
Networks.py 29KB
Layers.py 23KB
Util.py 21KB
Methods.py 20KB
ToolBox.py 19KB
c_Auto.py 19KB
GUI.py 16KB
Layers.py 15KB
Advanced.py 15KB
CvDTree.py 15KB
DistNN.py 15KB
NN.py 15KB
Layers.py 15KB
Networks.py 15KB
Layers.py 14KB
Networks.py 13KB
Layers.py 12KB
Networks.py 12KB
Network.py 11KB
d_Dist.py 11KB
Node.py 11KB
Tree.py 10KB
Operations.py 10KB
LinearSVM.py 10KB
SVM.py 9KB
Wrapper.py 9KB
RNN.py 9KB
Test.py 9KB
CvDTree.py 9KB
CvDTree.py 8KB
Toolbox.py 7KB
UnitTest.py 6KB
Main.py 6KB
Layers.py 6KB
MultinomialNB.py 6KB
MergedNB.py 5KB
Cluster.py 5KB
Layers.py 5KB
SVM.py 5KB
ProgressBar.py 5KB
a_Basic.py 5KB
共 218 条
- 1
- 2
- 3
资源评论
young_fly
- 粉丝: 7
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功