The Video Inference API can’t process more than 2FPS (ReactNative App), but when I check Roboflow Visualize, it has 6FPS—the same model and project. So I do something wrong
I use intervals and try to analyze more than one image simultaneously. But when I reduce the interval and try to get at least 3FPS in a minute, I start getting errors from the Roboflow API, which becomes overloaded.
Thank you for help
useEffect(() => {
const id = setInterval(async () => {
if (!camera.current) return;
const photo: PhotoFile = await camera.current.takePhoto({
enableShutterSound: false,
});
//const croppedPhoto = (await cropImage(withImagePath(photo.path))).path;
scanningRepository
.recognizeCategories(photo.path, String(modelVersion), modelName)
.then((data) => {
console.log('Recognized data: ' + JSON.stringify(data));
setLastPhoto(photo.path);
const text = data
.map((item: Category) => {
'worklet';
return item.name + ' ' + item.probability.toFixed(2);
})
.join(' ');
Some code
}
}
});
}, 500);
return () => {
clearTimeout(id);
};
}, [camera, itemsForLook.length]);