Wine is a wine bottle recognition module. Based on mobilenetv2 model, users need to input the model file path and classification mapping file to obtain the classification results.
npm install
npm run dev
npm run build
import * as mobilenet from '@paddlejs-models/mobilenet';
// model load
const path = 'https://paddlejs.bj.bcebos.com/models/fuse/mobilenet/wine_fuse_activation/model.json';
await mobilenet.load({
path,
mean: [0.485, 0.456, 0.406],
std: [0.229, 0.224, 0.225]
}, map);
// get classification results
const res = await mobilenet.classify(img);