Model change

Not sure if this improves things,
I'm mostly uploading this changeset
I had sitting around on my desktop.
This commit is contained in:
Brandon Rozek 2023-05-15 11:46:58 -04:00
parent ecd8bc8996
commit 4efc829b12
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480

View file

@ -3,12 +3,37 @@ const tf = require('@tensorflow/tfjs-node');
const bodyPix = require('@tensorflow-models/body-pix');
const {decodeJpeg} = require('./decode_image');
/*
* outputStride: Specifies the output stride of the BodyPix model.
* The smaller the value, the larger the output resolution, and more accurate
* the model at the cost of speed. Set this to a larger value to increase speed
* at the cost of accuracy. Stride 32 is supported for ResNet and
* stride 8,16,32 are supported for various MobileNetV1 models.
*/
/*
* multiplier: An optional number with values: 1.01, 1.0, 0.75, or
* 0.50. The value is used only by MobileNet architecture. It is the float
* multiplier for the depth (number of channels) for all convolution ops.
* The larger the value, the larger the size of the layers, and more accurate
* the model at the cost of speed. Set this to a smaller value to increase speed
* at the cost of accuracy.
*/
/*
* quantBytes: An optional number with values: 1, 2, or 4. This parameter
* affects weight quantization in the models. The available options are
* 1 byte, 2 bytes, and 4 bytes. The higher the value, the larger the model size
* and thus the longer the loading time, the lower the value, the shorter the
* loading time but lower the accuracy.
*/
async function main() {
const net = await bodyPix.load({
architecture: 'MobileNetV1',
outputStride: 16,
multiplier: 0.5,
quantBytes: 2
architecture: 'ResNet50',
outputStride: 16,
multiplier: 1.0,
quantBytes: 4
});
const sock = new zmq.Reply;