Description
Currently, when a user uses the app in offline mode, the ONNX model is used for edge inference. Unlike the cloud API which validates whether the image contains a fish, the ONNX model forces every image into 3 categories (Fresh, Moderate, Spoiled). Because of this, taking a picture of a human face or a non-fish object often results in a "Fresh" classification.
Tasks
- In
src/fusionInference.js, locate NOT_A_FISH_THRESHOLD.
- Increase this threshold (e.g., from
0.36 to 0.55 or higher) to make the model stricter, so it rejects low-confidence non-fish images.
- Alternatively, implement a lightweight object detection step to verify a fish is in the frame before running inference.
Description
Currently, when a user uses the app in offline mode, the ONNX model is used for edge inference. Unlike the cloud API which validates whether the image contains a fish, the ONNX model forces every image into 3 categories (Fresh, Moderate, Spoiled). Because of this, taking a picture of a human face or a non-fish object often results in a "Fresh" classification.
Tasks
src/fusionInference.js, locateNOT_A_FISH_THRESHOLD.0.36to0.55or higher) to make the model stricter, so it rejects low-confidence non-fish images.