以下为卖家选择提供的数据验证报告:
数据描述
This is an augmented version of the original QR-code dataset (https://www.kaggle.com/datasets/coledie/qr-codes). The purpose of this set is to simulate real-life data by adding noise, random cropping, shear, and rotation. This would help create more robust Object-detection and Generative models. In addition, the below code would also help with creating your very own Augmented dataset.
import cv2 import os datadir = 'qr_dataset' #you'll have to change datadir accordingly array = [] array_small =[] from tqdm import tqdm def create_training_data(): for img in tqdm(list(os.listdir(datadir))): # iterate over each image per dogs and cats try: img_array = cv2.imread(datadir+'/'+img ,cv2.IMREAD_COLOR) # convert to array new_array = cv2.resize(img_array, (128, 128)) # resize to normalize data size array.append([new_array]) array_small.append([cv2.resize(img_array, (32,32), interpolation=cv2.INTER_AREA)]) # add this to our training_data except Exception as e: # in the interest in keeping the output clean... pass create_training_data()
#augmenting the data from keras.preprocessing.image import ImageDataGenerator #this generator will save files in a physical format from skimage import io datagen = ImageDataGenerator( rotation_range = 40, shear_range = 0.2, zoom_range = 0.2, horizontal_flip = True, brightness_range = (0.5, 1.5)) for a in X: i = 0 a = a.reshape((1, ) + a.shape) for batch in datagen.flow(a, batch_size=1, save_to_dir= 'Augmented-images', save_prefix='dr', save_format='jpeg'): try: #iterate over every image and augment it i += 1 if i>= 10: break except Exception: #in case the image doesn't exist print("error") pass

QR-images-Augmented
144.24MB
申请报告