This wiki explains how to convert Tensorflow Object Detection SSD models to TFLite format.
These instructions use python3
and pip3
.
#!/usr/bin/python | |
import argparse, glob, os | |
from PIL import Image | |
formats = ["BMP", "DIB", "EPS", "GIF", "ICNS", "ICO", "IM", "JPG", "JPEG", | |
"J2K", "J2P", "JPX", "MSP", "PCX", "PNG", "PPM", "SGI", | |
"SPIDER", "TGA", "TIFF", "WebP", "XBM"] | |
parser = argparse.ArgumentParser(description="Pillow example - batch converter.") | |
parser.add_argument('-outdir', default='.', help='Directory to save converted image files') |
- recognitions.add( | |
- new Recognition( | |
- "" + i, | |
- labels.get((int) outputClasses[0][i] + labelOffset), | |
- outputScores[0][i], | |
- detection)); | |
+ final int classLabel = (int) outputClasses[0][i] + labelOffset; | |
+ if (inRange(classLabel, labels.size(), 0) && inRange(outputScores[0][i], 1, 0)) { | |
+ recognitions.add( | |
+ new Recognition( |
#!/usr/bin/env python3 | |
import tensorflow.lite as lite | |
from tensorflow.lite.python import lite_constants | |
import sys | |
# Converting a GraphDef from file. | |
def from_frozen_graph(graph_def_file): | |
input_arrays = ["normalized_input_image_tensor"] |
This wiki explains how to convert Tensorflow Object Detection SSD models to TFLite format.
These instructions use python3
and pip3
.
Build "Sources for Android 28" so you can comfortably browse the Android API source in Android Studio.
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
#!/usr/bin/env python3.6.4 | |
# coding="UTF-8" | |
__author__ = 'Toran Sahu <toran.sahu@yahoo.com>' | |
__copyright__ = 'Copyright (C) 2018 Ethereal Machines Pvt. Ltd. All rights reserved' | |
from django.db import models | |
from os import path | |
from utils import directory_path_with_id |
""" | |
author: Timothy C. Arlen | |
date: 28 Feb 2018 | |
Calculate Mean Average Precision (mAP) for a set of bounding boxes corresponding to specific | |
image Ids. Usage: | |
> python calculate_mean_ap.py | |
Will display a plot of precision vs recall curves at 10 distinct IoU thresholds as well as output |
A curated collection of awesome & free JavaScript books to help you learn the JavaScript programming language.
If you know of any other free JavaScript books that you think should be on this list, please let me know in the comments section and I will get them added.
package org.telegram.example.SendMessage; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.message.BasicNameValuePair; | |
import org.json.JSONArray; | |
import org.json.JSONObject; | |
import java.io.IOException; |
# The next line updates PATH for the Google Cloud SDK. | |
source /Users/dwchiang/google-cloud-sdk/path.zsh.inc | |
# The next line enables zsh completion for gcloud. | |
source /Users/dwchiang/google-cloud-sdk/completion.zsh.inc |