-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathREADME.t
More file actions
71 lines (52 loc) · 3.47 KB
/
README.t
File metadata and controls
71 lines (52 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# 场景分类
微调 Inception-ResNet-V2, 解决 AI Challenger 2017 场景分类问题。
## 依赖
- [NumPy](http://docs.scipy.org/doc/numpy-1.10.1/user/install.html)
- [Tensorflow](https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html)
- [Keras](https://keras.io/#installation)
- [OpenCV](https://opencv-python-tutroals.readthedocs.io/en/latest/)
## 数据集
我们使用AI Challenger 2017中的场景分类数据集,其中包含80,900种场景的60,999张图像。 数据分为53,879个训练图像和7,120个测试图像。

你可以从中得到它 [Scene Classification Dataset](https://challenger.ai/datasets/scene):
### 性能
用14118张测试图片计算平均准确率(mAP),结果如下:
| |Test A|Test B|
|---|---|---|
|图片数|7040|7078|
|Top3准确度|0.94346|0.91212|
## 用法
### 数据预处理
提取60,999个训练图像,并将它们分开(53,879个用于训练,7,120个用于验证):
```bash
$ python pre-process.py
```
### 训练
```bash
$ python train.py
```
如果想在培训期间进行可视化,请在终端中运行:
```bash
$ tensorboard --logdir path_to_current_dir/logs
```
### Demo
下载 [pre-trained model](https://github.com/foamliu/Scene-Classification/releases/download/v1.0/model.11-0.6262.hdf5) 放在 models 目录然后执行:
```bash
$ python demo.py
```
1 | 2 | 3 | 4 |
|---|---|---|---|
| |  | |  |
|$(result_0)|$(result_1)|$(result_2)|$(result_3)|
| |  | |  |
|$(result_4)|$(result_5)|$(result_6)|$(result_7)|
| |  | | |
|$(result_8)|$(result_9)|$(result_10)|$(result_11)|
| |  || |
|$(result_12)|$(result_13)|$(result_14)|$(result_15)|
| |  |  |  |
|$(result_16)|$(result_17)|$(result_18)|$(result_19)|
### 性能评估
```bash
$ python evaluate.py
```