diff --git a/src/helpers/map.js b/src/helpers/map.js index a6875ba..cb70300 100644 --- a/src/helpers/map.js +++ b/src/helpers/map.js @@ -133,7 +133,16 @@ async function gridSizeML(image, candidates) { export async function getGridSize(image) { const candidates = dividers(image.width, image.height); - let prediction = await gridSizeML(image, candidates); + let prediction; + + // Try and use ML grid detection + // TODO: Fix possible error on Android + try { + prediction = await gridSizeML(image, candidates); + } catch (error) { + console.error(error); + } + if (!prediction) { prediction = gridSizeHeuristic(image, candidates); }