Closed rmethaniya closed 2 months ago
Guten Tag, Hans here! 🍻
Thanks for providing detailed information about your issue. It seems like you have done ze proper steps, but I noticed you didn't try to reproduce this issue in ze VisionCamera Example app. Please give it a try, as this can help narrow down ze problem.
Also, if you could provide some logs directly from Xcode (for iOS) or adb logcat (for Android), it would really assist mrousavy in diagnosing ze issue.
Let’s try to get this fixed!
Note: If you think I made a mistake, please ping
@mrousavy
to take a look.
@mrousavy I've attached the xCode logs. Please let me know if you need any more information.
Well, resizing a max
resolution frame might just take a while. I'm actually surprised that this even works, I think resizing should be handled inside runAsync
.
I am encountering a crash in my application when using the resize function inside the runAsync method. The app fails to execute properly, which seems to be related to the asynchronous execution within the resize call.
`runAsync(frame, () => { 'worklet';
const resizes = resize(frame, {
scale: {
width: 224,
height: 480,
},
pixelFormat: 'rgb',
dataType: 'uint8',
});
const resized = Object.values(resizes);
const uint8 = Float32Array.from(resized, value => value / 255);
const dict = model.runSync([uint8])[0];
}); `
Expected, The application should process the image resizing and run the model without crashing.
Hm that's weird. I remember this working back when I tested it. As of right now, I don't have any free time to investigate this though.
What's happening?
When the frame processor is disabled, the recorded video is smooth and free of frame drops. However, when the frame processor is enabled, the recorded video shows noticeable frame drops.
The issue occurs when using the
useFrameProcessor
to resize frames and play them every second withrunAtTargetFps
. Additionally,runAsync
is used for frame processing, and frame detection is performed withreact-native-fast-tflite
usingrunSync
.Environment:
Reproduceable Code
Relevant log output
Camera Device
Device
iPhone 14 (iOS 17.5.1)
VisionCamera Version
4.0.5
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information