`tfImageRecognition.recognize(data)` not returning a result
const results = await tfImageRecognition.recognize({
image: require('../../assets/earth-alighted.jpeg'), // Also tried using "file://image_ocation.jpg" of cached image location from React-Native-Camera `takePictureAsync()`
inputName: "input",
inputSize: 224,
outputName: "output",
maxResults: 3,
threshold: 0.1,
});
Could it be because the property values inputSize, outputName... are not correct? How would I determine what those values are?
I saw in issue #11 that the outputName needs to be the same output name as the model used - I'm using the YOLO2 model. Could this maybe be the issue, that it's not mapping the return result correctly?
hey @Friendly-Robot I'm facing the same problem i had solve for static images which is prestored in assets folder but when I'm loading the image dynamically by taking images from camera or from phone gallery by using react-native-image-picker it is showing an error saying could not load the resource here is my code
const results = await tfImageRecognition.recognize({
image: this.state.pickedImage
})
can you please help me out if you know how can i do it dynamically
Hi @chirag773 , I wish I could help you. There were some difficulties with getting good results from our model so we ended up going with the Google Cloud API. I do remember it working before we switched though, but that code looks like it got washed away at some point. Have you tried setting various paths that are returned from the image capture response? If you're using Android, I remember some cases I needed to prepend file:// to the path in order to access it - not sure if I used this solution here though. Just know that it can work, but the solution escapes me. Good luck!
I have the same problem as @chirag773 ...
I'm trying to use the recognize method on a picture taken on the app... I already have the photo as base64, but the recognize method always give me "Error: image".
Can you help me please?