This file contains hidden or 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 pymeshlab as ml | |
ms = ml.MeshSet() | |
ms.load_new_mesh('input.ply') | |
m = ms.current_mesh() | |
print('input mesh has', m.vertex_number(), 'vertex and', m.face_number(), 'faces') | |
# Target number of vertex | |
TARGET=10000 |
This file contains hidden or 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
# Importing necessary functions | |
from keras.preprocessing.image import ImageDataGenerator, | |
array_to_img, img_to_array, load_img | |
# Initialising the ImageDataGenerator class. | |
# We will pass in the augmentation parameters in the constructor. | |
datagen = ImageDataGenerator( | |
rotation_range = 40, | |
shear_range = 0.2, | |
zoom_range = 0.2, |
This file contains hidden or 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
# Create The Sandbox You Play In | |
conda create --name your_env_name python=3.7 -y | |
conda create --name your_env_name python=3.7 scipy=0.15.0 astroid babel | |
conda env export > my_environment.yml | |
conda info --envs | |
conda activate your_env_name |
This file contains hidden or 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 cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import os | |
""" | |
source: https://medium.com/@nhancv/opencv-python-connect-to-android-camera-via-rstp-9eb78e2903d5 | |
NB: Did not work on windows 10 | |
""" | |
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;0" |
This file contains hidden or 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 necessary packages | |
import numpy as np | |
import cv2 | |
# path to image | |
path_to_image = "data/cv_image_000.jpg" | |
# read the image with cv2 | |
image = cv2.imread(path_to_image) | |
print('Original Dimensions : ', image.shape) |
This file contains hidden or 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 cv2 | |
import os | |
import numpy as np | |
import glob | |
video_file_name = 'FILE_NAME.mp4' | |
path_to_images = 'PATH' | |
extension = "png" # png, jpg, ... |
This file contains hidden or 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
kinect_v2_ubuntu18 | |
Kinect2 Setup Guide | |
https://scazlab.github.io/kinect2_setup_guide.html | |
Welcome to the Setup Guide for Kinect2. | |
System |
This file contains hidden or 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 necessary packages | |
import tensorflow as tf | |
import tensorflow_datasets as tfds | |
# Construct a tf.data.Dataset | |
# Data loaded into ~/tensorflow_datasets/mnist | |
ds = tfds.load('mnist', split='train', shuffle_files=True) | |
# Build your input pipeline | |
ds=ds.shuffle(1024).batch(32).prefetch(tf.data.experimental.AUTOTUNE) |
This file contains hidden or 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 keras.models import load_model | |
from PIL import Image, ImageOps | |
import numpy as np | |
# Load the model | |
model = load_model('keras_model.h5') | |
# Create the array of the right shape to feed into the keras model | |
# The 'length' or number of images you can put into the array is | |
# determined by the first position in the shape tuple, in this case 1. |
This file contains hidden or 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 necessary packages | |
import numpy as np | |
import cv2 | |
# path to image | |
path_to_image = "data/cv_image_000.jpg" | |
# read the image with cv2 | |
image = cv2.imread(path_to_image) | |
print('Original Dimensions : ', image.shape) |