๐
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
{ | |
"workbench.colorTheme": "Default Light+", | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.tokenColorCustomizations": { | |
"[Material Theme Lighter]": { | |
}, | |
"[Default Light+]": { | |
"keywords": "#0000ff" | |
} |
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 tensorflow as tf | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Flatten, Dense, Conv2D | |
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
train_datagen = ImageDataGenerator( | |
rescale=1./255, | |
validation_split=0.15 | |
) |
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 time | |
import copy | |
from soscon.env import Env | |
from soscon.status import Status | |
from soscon.data.observation import Observation | |
class RobotController(): | |
LIDAR_DATA_SIZE = 360 | |
IR_DATA_SIZE = 5 |
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 tensorflow as tf | |
import numpy as np | |
import os | |
import cv2 | |
import argparse | |
def read_img(name): | |
x = cv2.imread(name, cv2.IMREAD_COLOR) | |
x = cv2.cvtColor(x, cv2.COLOR_BGR2RGB) | |
return x |
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 random | |
import os | |
from tqdm import tqdm | |
from PIL import Image, ImageOps | |
from concurrent.futures import ThreadPoolExecutor | |
original_path = './original/' | |
resize_path = './resize/' | |
data_path = './data/' | |
pbar = 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 numpy as np | |
def get_pivot(arr, reverse=False): | |
if reverse: | |
arr = np.flip(arr, 0)[1:] | |
for item in arr: | |
if item != 0: | |
return item |
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
from PIL import Image, ImageOps, ImageCms | |
from random import randrange | |
from tqdm import tqdm | |
from concurrent.futures import ThreadPoolExecutor | |
import os | |
import io | |
original_path = 'original' | |
resize_path = 'resize' | |
folder_arr = ['0'] |
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 tensorlayer as tl | |
import tensorflow as tf | |
from config import config, log_config | |
from utils import * | |
def read_tf_img(path, name): | |
temp_string = tf.read_file(path + name) | |
temp_decoded = tf.image.decode_image(temp_string, channels=4) | |
temp_image = tf.image.per_image_standardization(temp_decoded) |
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 pprint | |
import tensorflow as tf | |
import tensorlayer as tl | |
if 'COLAB_TPU_ADDR' not in os.environ: | |
print('ERROR: Not connected to a TPU runtime; please see the first cell in this notebook for instructions!') | |
else: | |
tpu_address = 'grpc://' + os.environ['COLAB_TPU_ADDR'] | |
print ('TPU address is', tpu_address) |
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
from PIL import Image, ImageOps | |
from random import randrange | |
from tqdm import tqdm | |
import os | |
target_size = 448 | |
original_path = 'original' | |
resize_path = 'resize' | |
folder_arr = ['1262768'] |