thegrizzlylabs / geniusscan-sdk-demo

Demo apps for Genius Scan SDK
30 stars 38 forks source link

[Question] is data extraction supported in flutter? #85

Open abdallah-odeh opened 2 months ago

abdallah-odeh commented 2 months ago

Is data extraction supported in the Flutter plugin? if so, can you please update the documentation or write here how to use it thanks in advance

### Tasks
bvirlet commented 2 months ago

Hello,

At this moment, only the bankDetails structured data extraction is exposed to the Flutter plugin but the next update will expose the other structured data: receipt and businessCard.

Which one is of interest to you?

bvirlet commented 2 months ago

Hi there, The new update of the SDK v5.0.8 has been published, and it exposes the data extraction to Flutter. The documentation is updated to reflect this.

abdallah-odeh commented 2 months ago

Hello @bvirlet, that's great to hear, I will update the library and tell you the results

abdallah-odeh commented 2 months ago

Hello @bvirlet I tried the entity extraction but sadly the results were bad in a way that prevents me from using it for production

Sample 1 ## Image: Screenshot 2024-06-23 at 9 01 33 AM ## Scan result: ``` flutter: scans[0][structuredData][receipt][locale]: en-US flutter: scans[0][structuredData][receipt][amount]: 0.0 flutter: scans[0][structuredData][receipt][category]: other flutter: scans[0][structuredData][receipt][currency]: USD flutter: scans[0][structuredData][receipt][date]: 1717578000.0 ``` ## Issues: - the returned amount is `0.0`, original amount is `99.0` - the returned date is in invalid format (double) although I tried to convert `DateTime.fromMillisecondsSinceEpoch((result['scans'][0]['structuredData']['receipt']['date'] as double).toInt())` and date returned is `1970-01-20 23:06:18.000`
Sample 2 ## Image: Screenshot 2024-06-23 at 8 46 19 AM ## Scan result: ``` flutter: scans[0][structuredData][receipt][date]: 1706864400.0 flutter: scans[0][structuredData][receipt][currency]: USD flutter: scans[0][structuredData][receipt][category]: supermarket flutter: scans[0][structuredData][receipt][merchant]: nd February flutter: scans[0][structuredData][receipt][locale]: en-US flutter: scans[0][structuredData][receipt][amount]: 23.9 ``` ## Issues: - the returned date is same as issue in Sample 1 - the returned category is wrong, I can't find the word "supermarket" mentioned in the image so I don't know where did it come from, NOTE: I don't use the category but it's still an issue for other users maybe - the returned merchant is also wrong, I don't know why it took "nd February" as a merchant name, it's not bold neither headline text, what are the factors the determine this is a merchant name?