application_vnd.jupyter.stderr_output_1.png
from glob import glob

import numpy as np # linear algebra

import os

import os
from glob import glob
TRAIN_DATA = '../input/train'
type_1_files = glob(os.path.join(TRAIN_DATA, 'Type_1', '*.jpg'))
type_2_files = glob(os.path.join(TRAIN_DATA, 'Type_2', '*.jpg'))
type_3_files = glob(os.path.join(TRAIN_DATA, 'Type_3', '*.jpg'))
type_1_ids = np.array([s[len(os.path.join(TRAIN_DATA, 'Type_1')) + 1:-4] for s in type_1_files])
type_2_ids = np.array([s[len(os.path.join(TRAIN_DATA, 'Type_2')) + 1:-4] for s in type_2_files])
type_3_ids = np.array([s[len(os.path.join(TRAIN_DATA, 'Type_3')) + 1:-4] for s in type_3_files])
print(len(type_1_files), len(type_2_files), len(type_3_files))
print('Type 1', type_1_ids[:10])
print('Type 2', type_2_ids[:10])
print('Type 3', type_3_ids[:10])