natanielruiz
2017-09-27 8f2b081586161a55388934456a9b0193d02dd267
code/datasets.py
@@ -128,12 +128,10 @@
        yaw = pose[1] * 180 / np.pi
        roll = pose[2] * 180 / np.pi
        rnd = np.random.random_sample()
        if rnd < 0.5:
            ds = 10
            original_size = img.size
            img = img.resize((img.size[0] / ds, img.size[1] / ds), resample=Image.NEAREST)
            img = img.resize((original_size[0], original_size[1]), resample=Image.NEAREST)
        ds = np.random.randint(1,11)
        original_size = img.size
        img = img.resize((img.size[0] / ds, img.size[1] / ds), resample=Image.NEAREST)
        img = img.resize((original_size[0], original_size[1]), resample=Image.NEAREST)
        # Flip?
        rnd = np.random.random_sample()