This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from glob import glob | |
from datetime import datetime | |
from shutil import copyfile | |
import imgaug as ia | |
from imgaug import augmenters as iaa | |
from scipy.misc import imsave, imread | |
INPUT = 'test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
from glob import glob | |
from PIL import Image | |
INPUT = 'flower_split' | |
VAL_NUMBER = 4 | |
def get_files(path): | |
dirs = [x[0] for x in os.walk(path)][1:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from glob import glob | |
from datetime import datetime | |
from shutil import copyfile | |
import imgaug as ia | |
from imgaug import augmenters as iaa | |
from scipy.misc import imsave, imread | |
INPUT = 'flower_split' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from scipy.signal import savgol_filter | |
train=pd.read_csv('run_train,tag_accuracy_1.csv', sep=',', header=0) | |
val=pd.read_csv('run_validation,tag_accuracy_1.csv', sep=',', header=0) | |
def annot_max(x, y, ax=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import csv | |
from PIL import Image | |
output = 'flower_split' | |
with open('flower_labels.csv') as csvfile: | |
label_reader = csv.reader(csvfile, delimiter=',') | |
next(label_reader) # skipping header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from PIL import Image | |
for i in range(100): | |
noise = np.random.rand(28, 28, 3) * 255 | |
noise_img = Image.fromarray(noise.astype('uint8')) | |
noise_img.save(str(i) + '.jpg') |