layout | title | permalink |
---|---|---|
default |
Raspberry Pi Setup |
/tutorials/Raspberry-Pi-setup/ |
by Chris Lovett and Ofer Dekel
# -------------------------- | |
# Source and reference | |
# https://github.com/udacity/CarND-Semantic-Segmentation | |
# https://gist.github.com/lianyi/a5ba8d84f5b68401c2313b05e020b062 | |
# https://medium.com/nanonets/how-to-do-image-segmentation-using-deep-learning-c673cc5862ef | |
# -------------------------- | |
# -------------------------- | |
# DATA PREPARATION |
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
#!/usr/bin/env python | |
"""File format conversion | |
category: vtk, file conversion, tomb""" | |
import os, sys | |
import vtk | |
def vtk2vtp(invtkfile, outvtpfile, binary=False): | |
"""What it says on the label""" | |
reader = vtk.vtkPolyDataReader() |
import os | |
import time | |
import busio | |
import digitalio | |
import board | |
import adafruit_mcp3xxx.mcp3008 as MCP | |
from adafruit_mcp3xxx.analog_in import AnalogIn | |
# create the spi bus | |
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI) |
var url = require('url'), | |
mongodb = require('mongodb'); | |
var sourceUrl = 'mongodb://user:pass@host:port/db', | |
targetUrl = 'mongodb://user:pass@host:port/db', | |
collectionName = 'my_awesome_collection'; | |
function openDbFromUrl(mongoUrl, cb) { | |
var dbUrl = url.parse(mongoUrl), | |
dbName = dbUrl.pathname.slice(1), // no slash |
#create a test index with shingle mapping | |
curl -XPUT localhost:9200/test -d '{ | |
"settings":{ | |
"index":{ | |
"analysis":{ | |
"analyzer":{ | |
"analyzer_shingle":{ | |
"tokenizer":"standard", | |
"filter":["standard", "lowercase", "filter_stop", "filter_shingle"] | |
} |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |