alemart / speedy-vision

GPU-accelerated Computer Vision for JavaScript.
Apache License 2.0
175 stars 28 forks source link

Out of Memory Error #49

Closed under-score closed 1 year ago

under-score commented 1 year ago

I have rewritten the LSH Feature Mapping for my own purpose. After testing of 8 or 10 (matchingMedia) images against the pretested set

const matchingPipeline = createMatchingPipeline(combinedTrainingKeypoints, matchingMedia);
const result = await matchingPipeline.run();

it crashes with this error.

Bildschirmfoto 2023-10-11 um 09 06 01

Anything I could do?

alemart commented 1 year ago

Yes. Open src/gpu/speedy-texture-pool.js and change the DEFAULT_CAPACITY from 1024 to a larger value such as 2048. Run npm run build to generate a new .js file and try again.

In addition, make your pipeline leaner if possible. In my demo, I created one training pipeline for each training image for the sake of simplicity and didactics. It would be more economical to train with a single pipeline instead. I can help you with that if you need it.

alemart commented 1 year ago

May I be of further help?

under-score commented 1 year ago

Great, solved my problem! Will DM you ...

alemart commented 1 year ago

Glad to know it's solved!