I hereby claim:
- I am kentsommer on github.
- I am kentsommer (https://keybase.io/kentsommer) on keybase.
- I have a public key ASDq1kE3OCWdypuzymWKSK1Gx696Q1oK7TfJN2RlaJzoWAo
To claim this, I am signing this object:
| read -p 'Ethernet device to use (can find with ifconfig): ' ethdev | |
| sudo tcpdump -i $ethdev port 2368 -n | awk '{ print gensub(/(.*)\..*/,"\\1","g",$3), $4, gensub(/(.*)\..*/,"\\1","g",$5) }' | cut -d ' ' -f1 |
I hereby claim:
To claim this, I am signing this object:
| import numpy as np | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| import torch.optim as optim | |
| from torch.autograd import Variable | |
| from torch.nn.parameter import Parameter | |
| # Pool and Inject Module |
| #include <pcl/io/pcd_io.h> | |
| #include <pcl/sample_consensus/method_types.h> | |
| #include <pcl/sample_consensus/model_types.h> | |
| #include <pcl/segmentation/sac_segmentation.h> | |
| #include <pcl/filters/extract_indices.h> | |
| #include <pcl/surface/convex_hull.h> | |
| #include <pcl/segmentation/extract_polygonal_prism_data.h> | |
| #include <pcl/visualization/cloud_viewer.h> | |
| #include <iostream> |
| cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | |
| project(TABLETOP_EXTRACTION) | |
| find_package(PCL REQUIRED) | |
| include_directories(${PCL_INCLUDE_DIRS}) | |
| link_directories(${PCL_LIBRARY_DIRS}) | |
| add_definitions(${PCL_DEFINITIONS}) | |
| add_executable(extract extract.cpp) | |
| target_link_libraries(extract ${PCL_LIBRARIES}) |
| from keras.applications.inception_v3 import * | |
| from keras.preprocessing import image | |
| from keras.applications.imagenet_utils import decode_predictions | |
| from keras import backend as K | |
| import numpy as np | |
| model = InceptionV3(weights='imagenet') | |
| img_path = 'apple.jpg' | |
| img = image.load_img(img_path, target_size=(299, 299)) |
| csv_path = "submission_kent.csv" | |
| csv_data = [] | |
| csv_data.append(["image_name", "Type_1", "Type_2", "Type_3"]) | |
| for index, prediction in enumerate(result): | |
| img_name = data_names[index] | |
| type_1 = '{0:.15f}'.format(prediction[0]) | |
| type_2 = '{0:.15f}'.format(prediction[1]) | |
| type_3 = '{0:.15f}'.format(prediction[2]) | |
| line = [img_name, type_1, type_2, type_3] |
| import os | |
| import cv2 | |
| import numpy as np | |
| from glob import glob | |
| from tqdm import tqdm | |
| from keras.preprocessing import image | |
| from keras.applications.inception_v3 import preprocess_input | |
| def preprocess_input(x): |
| magic_number_1 = size_of_last_conv_layer | |
| magic_number_2 = number_of_rows_in_dense / magic_number_1 | |
| def shuffle_rows(original_w): | |
| converted_w = np.zeros(original_w.shape) | |
| count = 0 | |
| for index, row in enumerate(original_w): | |
| if (index % magic_number_1) == 0 and index != 0: | |
| count += 1 | |
| new_index = ((index % magic_number_1) * magic_number_2) + count |