Files changed (1) hide show
  1. README.md +12 -1
README.md CHANGED
@@ -14,6 +14,7 @@ bounding_boxes.txt;classes.txt;image_class_labels.txt; images.txt; train
14
  本博客主要是根据train_test_split.txt文件和images.txt文件将原始下载的CUB200-2011数据集划分为训练集和测试集。在深度学习Pytorch框架下采用ImageFolder和DataLoader读取数据集较为方便。相关的python代码如下:
15
 
16
  (1) CUB200-2011训练集和测试集划分代码
 
17
  # *_*coding: utf-8 *_*
18
  # author --liming--
19
 
@@ -74,7 +75,11 @@ for k in range(num):
74
 
75
  time_end = time.time()
76
  print('CUB200训练集和测试集划分完毕, 耗时%s!!' % (time_end - time_start))
 
 
 
77
  config文件
 
78
  # *_*coding: utf-8 *_*
79
  # author --liming--
80
 
@@ -83,7 +88,11 @@ path = '/media/lm/C3F680DFF08EB695/细粒度数据集/birds/CUB200/CUB_200_2011/
83
  ROOT_TRAIN = path + 'images/train/'
84
  ROOT_TEST = path + 'images/test/'
85
  BATCH_SIZE = 16
 
 
 
86
  (2) 利用Pytorch方式读取数据
 
87
  # *_*coding: utf-8 *_*
88
  # author --liming--
89
 
@@ -129,4 +138,6 @@ def test_data_load():
129
 
130
  if __name__ == '__main___':
131
  train_data_load()
132
- test_data_load()
 
 
 
14
  本博客主要是根据train_test_split.txt文件和images.txt文件将原始下载的CUB200-2011数据集划分为训练集和测试集。在深度学习Pytorch框架下采用ImageFolder和DataLoader读取数据集较为方便。相关的python代码如下:
15
 
16
  (1) CUB200-2011训练集和测试集划分代码
17
+ ```python
18
  # *_*coding: utf-8 *_*
19
  # author --liming--
20
 
 
75
 
76
  time_end = time.time()
77
  print('CUB200训练集和测试集划分完毕, 耗时%s!!' % (time_end - time_start))
78
+
79
+ ```
80
+
81
  config文件
82
+ ```python
83
  # *_*coding: utf-8 *_*
84
  # author --liming--
85
 
 
88
  ROOT_TRAIN = path + 'images/train/'
89
  ROOT_TEST = path + 'images/test/'
90
  BATCH_SIZE = 16
91
+
92
+ ```
93
+
94
  (2) 利用Pytorch方式读取数据
95
+ ```python
96
  # *_*coding: utf-8 *_*
97
  # author --liming--
98
 
 
138
 
139
  if __name__ == '__main___':
140
  train_data_load()
141
+ test_data_load()
142
+
143
+ ```