I have an image file (invoice) and a json where I have list of extracted entites. And I…
- User
I have an image file (invoice) and a json where I have list of extracted entites. And I have a csv file containing OCR textract output containing these columns ((page_num,block_num,line_num,word_num,left,right,top,bottom,width,height,conf,text,image_height,image_width)) JSON Format: { "invoice_details":{ "invoice_number ": "", "invoice_date": "", "invoice_due_date": "", "order_id": "", "vendor_name": "", "buyer_name": "", "shipto_name": "", "billto_name": "", }, "Payment Details": { "vendor_ifsccode" :"", "vendor_bankname" :"", "account_number" :"", "bank_payment_terms":"", } "address_details": { "vendor_address": "", "billto_address": "", "shipto_address": "" }, "amounts_and_tax": { "Subtotal_or_taxable_amount": "", "total_sgst_amount ": "", "total_cgst_amount ": "", "total_igst_amount ": "", "total_amount_after_tax": "" "billto_GSTIN": "", "vendor_GSTIN": "", "shipto_GSTIN": "" }, "line_items":{list of key-value pairs with column name as key and cell value as value row with following columns: "hsn_code","description","unit_of_measurement_or_uom","unit_price","quantity","sgst_rate","sgst_amount","cgst_rate","cgst_amount","igst_rate","igst_amount","taxable_amount_or_subtotal","total_amount_or_gross_amount_of_the_item" } }
I want to map the bounding boxes from the json to image. And print the bounding boxes on image
Write a highly advance python code to map the bounding boxex. Handle All the multi token entities and multi token entites should come as one single bounding box.
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.