This file contains 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
<html> | |
<body> | |
<!-- Load TensorFlow.js --> | |
<script src="https://unpkg.com/@tensorflow/tfjs"></script> | |
<!-- Load Posenet --> | |
<script src="https://unpkg.com/@tensorflow-models/posenet"> | |
</script> | |
<script type="text/javascript"> | |
posenet.load().then(function(net) { | |
// posenet model loaded |
This file contains 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
<html> | |
<body> | |
<!-- Load TensorFlow.js --> | |
<script src="https://unpkg.com/@tensorflow/tfjs"></script> | |
<!-- Load Posenet --> | |
<script src="https://unpkg.com/@tensorflow-models/posenet"> | |
</script> | |
<script type="text/javascript"> | |
posenet.load().then(function(net) { | |
// posenet model loaded |
This file contains 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
let classifier; | |
let video; | |
function setup() { | |
noCanvas(); | |
// Create a camera input | |
video = createCapture(VIDEO); | |
// Initialize the Image Classifier method with MobileNet and the video as the second argument | |
classifier = ml5.imageClassifier('MobileNet', video, modelReady); | |
} |
This file contains 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
idenprof//train//Lila// 900 images of Lila | |
idenprof//train//Marc// 900 images of Marc | |
idenprof//train//Rob// 900 images of Rob | |
idenprof//test//Lila// 200 images of Lila | |
idenprof//test//Marc// 200 images of Marc | |
idenprof//test//Rob// 200 images of Rob |
This file contains 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
const imageScaleFactor = 0.50; | |
const flipHorizontal = false; | |
const outputStride = 16; | |
const imageElement = document.getElementById('cat'); | |
// load the posenet model | |
const net = await posenet.load(); | |
const pose = await net.estimateSinglePose(imageElement, scaleFactor, flipHorizontal, outputStride); |
This file contains 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
const imageScaleFactor = 0.50; | |
const flipHorizontal = false; | |
const outputStride = 16; | |
// get up to 5 poses | |
const maxPoseDetections = 5; | |
// minimum confidence of the root part of a pose | |
const scoreThreshold = 0.5; | |
// minimum distance in pixels between the root parts of poses | |
const nmsRadius = 20; | |
const imageElement = document.getElementById('cat'); |
This file contains 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
// Add this to the header of your file, e.g. in ViewController.m | |
// after #import "ViewController.h" | |
#import <FBSDKCoreKit/FBSDKCoreKit.h> | |
#import <FBSDKLoginKit/FBSDKLoginKit.h> | |
// Add this to the body | |
@implementation ViewController | |
- (void)viewDidLoad { |
This file contains 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
"messaging_type": "<MESSAGING_TYPE>", | |
"recipient":{ | |
"id":"<PSID>" | |
}, | |
"message":{ | |
"text":"hello, world!" | |
} |
This file contains 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
<script> | |
function maPosition(position) { | |
var infopos = "Position déterminée :\n"; | |
infopos += "Latitude : "+position.coords.latitude +"\n"; | |
infopos += "Longitude: "+position.coords.longitude+"\n"; | |
infopos += "Altitude : "+position.coords.altitude +"\n"; | |
document.getElementById("infoposition").innerHTML = infopos; | |
} | |
if(navigator.geolocation) |
This file contains 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
function maPosition(position) { | |
var infopos = "Position déterminée :\n"; | |
infopos += "Latitude : "+position.coords.latitude +"\n"; | |
infopos += "Longitude: "+position.coords.longitude+"\n"; | |
infopos += "Altitude : "+position.coords.altitude +"\n"; | |
infopos += "Vitesse : "+position.coords.speed +"\n"; | |
document.getElementById("infoposition").innerHTML = infopos; | |
// Un nouvel objet LatLng pour Google Maps avec les paramètres de position |
OlderNewer