Skip to content

Instantly share code, notes, and snippets.

View leigh-johnson's full-sized avatar
💜

Leigh Johnson leigh-johnson

💜
View GitHub Profile
@leigh-johnson
leigh-johnson / log.do_compile.2280811
Created November 27, 2022 22:56
libcamera/202210+gitAUTOINC+7219110a12-r0
DEBUG: Executing shell function do_compile
[1/154] /home/leigh/projects/poky/build-rpi4/tmp/work/cortexa72-bitsy-linux/libcamera/202210+gitAUTOINC+7219110a12-r0/git/utils/gen-header.sh /home/leigh/projects/poky/build-rpi4/tmp/work/cortexa72-bitsy-linux/libcamera/202210+gitAUTOINC+7219110a12-r0/git/include/libcamera include/libcamera/libcamera.h
[2/154] aarch64-bitsy-linux-g++ -mcpu=cortex-a72 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/leigh/projects/poky/build-rpi4/tmp/work/cortexa72-bitsy-linux/libcamera/202210+gitAUTOINC+7219110a12-r0/recipe-sysroot -Isrc/libcamera/base/libcamera-base.so.0.0.1.p -Isrc/libcamera/base -I../git/src/libcamera/base -Iinclude -I../git/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include /home/leigh/projects/poky/build-rpi4/tmp/work/cortexa72-bitsy-linux/libcamera/202210+gitAUTOINC+7219110a12-r0/bui
@leigh-johnson
leigh-johnson / google-cloud-automl-metrics-vision.ipynb
Last active April 17, 2021 23:30
Google AutoML Metrics Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leigh-johnson
leigh-johnson / automl_evalutation_metrics.py
Last active February 24, 2021 05:12
TensorFlow Everywhere North America - scripts and snippets
###
# Load AutoML evaluation metrics via Python API client
##
from google.cloud import automl
from google.protobuf.json_format import MessageToDict
import pandas as pd
project_id = "your-project-id"
model_id = "your-model-id" # look for modelId= in the GCP console url
@leigh-johnson
leigh-johnson / setup.py
Last active November 22, 2020 01:42
setup.py with tensorflow 2.x
# setup.py
import os
from setuptools import setup
arch = os.uname().machine
if arch == 'armv7l':
tensorflow = 'tensorflow @ https://github.com/bitsy-ai/tensorflow-arm-bin/releases/download/v2.4.0-rc2/tensorflow-2.4.0rc2-cp37-none-linux_armv7l.whl'
elif arch == 'aarch64':
{
"openapi": "3.0.3",
"info": {
"title": "",
"version": "0.0.0"
},
"paths": {
"/api/auth-token/": {
"post": {
"operationId": "auth_token_create",
@leigh-johnson
leigh-johnson / normalize-csv.ipynb
Created November 1, 2020 21:19
Automatic VoTT Bounding Box suggestions with Google Cloud AutoML Vision model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"embeddings": [
{
"tensorName": "My tensor",
"tensorShape": [
1000,
50
],
"tensorPath": "https://raw.githubusercontent.com/.../tensors.tsv",
"metadataPath": "https://raw.githubusercontent.com/.../optional.metadata.tsv"
$ sudo bazel --host_jvm_args=-Xmx512m build \
--config=opt \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--local_resources=4096.0,3.0,1.0 \
--copt=-mfpu=neon-vfpv4 \
--copt=-ftree-vectorize \
--copt=-funsafe-math-optimizations \
#!/usr/bin/env bash
TMP_DIR=${HOME}/tmp
TF_MODELS_DIR=${HOME}/projects/models
TF_MODELS_PY=${HOME}/projects/models/.venv/bin/python
MODEL_NAME=ssd_mobilenet_v3_small_coco_2019_08_14
MODEL_URL=http://download.tensorflow.org/models/object_detection/${MODEL_NAME}.tar.gz
MODEL_DIR=${TMP_DIR}/${MODEL_NAME}
CONFIG_FILE=${MODEL_DIR}/pipeline.config
CHECKPOINT=${MODEL_DIR}/model.ckpt
@leigh-johnson
leigh-johnson / mobilenet_v2_architechture.txt
Created July 7, 2019 04:32
Portable Computer Vision, SF Python July 2019
Model: "mobilenetv2_1.00_224"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) [(None, 224, 224, 3) 0
__________________________________________________________________________________________________
Conv1_pad (ZeroPadding2D) (None, 225, 225, 3) 0 input_1[0][0]
__________________________________________________________________________________________________
Conv1 (Conv2D) (None, 112, 112, 32) 864 Conv1_pad[0][0]
__________________________________________________________________________________________________