Closed ghost closed 2 years ago
what is the problem? which part? what do you suggest? whats the alternative? this is not a constructive issue.
right, im trying to use this, but there is no minimal example ("simplest" example is over 215 LOC!), and i see most of the functions are helper functions, (log and status make sense though)
shortest full demo for browsers is 100 LOC and most of it is comments and initialization of the webcam which has nothing to do with the library
shortest full demo for nodejs is 200 LOC because of all pretty-printing of results. if you want just a quick start, here:
const fs = require('fs');
const Human = require('@vladmandic/human').default;
async function main(inputFile) {
const human = new Human(); // create instance of human using default configuration
const buffer = fs.readFileSync(inputFile); // read file data into buffer
const tensor = human.tf.node.decodeImage(buffer); // decode jpg data
const result = await human.detect(tensor); // run detection; will load models on-demand and initialize backend
console.log(result);
}
main('samples/in/ai-body.jpg');
This makes it very confusing