class_docstr: WildReceipt dataset from `"Spatial Dual-Modality Graph Reasoning for Key Information Extraction"
      <https://arxiv.org/abs/2103.14470v1>`_ |
  `repository <https://download.openmmlab.com/mmocr/data/wildreceipt.tar>`_.
  
  .. image:: https://doctr-static.mindee.com/models?id=v0.7.0/wildreceipt-dataset.jpg&src=0
      :align: center
  
  >>> # NOTE: You need to download the dataset first.
  >>> from doctr.datasets import WILDRECEIPT
  >>> train_set = WILDRECEIPT(train=True, img_folder="/path/to/wildreceipt/",
  >>>                     label_path="/path/to/wildreceipt/train.txt")
  >>> img, target = train_set[0]
  >>> test_set = WILDRECEIPT(train=False, img_folder="/path/to/wildreceipt/",
  >>>                    label_path="/path/to/wildreceipt/test.txt")
  >>> img, target = test_set[0]
  
  Args:
  ----
      img_folder: folder with all the images of the dataset
      label_path: path to the annotations file of the dataset
      train: whether the subset should be the training one
      use_polygons: whether polygons should be considered as rotated bounding box (instead of straight ones)
      recognition_task: whether the dataset should be used for recognition task
      **kwargs: keyword arguments from `AbstractDataset`.
class_docstr_tok: ["WildReceipt","dataset","from","`","``","Spatial","Dual-Modality","Graph","Reasoning","for","Key","Information","Extraction","''","<","https",":","\/\/arxiv.org\/abs\/2103.14470v1",">","`","_","|","`","repository","<","https",":","\/\/download.openmmlab.com\/mmocr\/data\/wildreceipt.tar",">","`","_",".","..","image",":",":","https",":","\/\/doctr-static.mindee.com\/models","?","id=v0.7.0\/wildreceipt-dataset.jpg","&","src=0",":","align",":","center",">",">",">","#","NOTE",":","You","need","to","download","the","dataset","first",".",">",">",">","from","doctr.datasets","import","WILDRECEIPT",">",">",">","train_set","=","WILDRECEIPT","(","train=True",",","img_folder=","''","\/path\/to\/wildreceipt\/","''",",",">",">",">","label_path=","''","\/path\/to\/wildreceipt\/train.txt","''",")",">",">",">","img",",","target","=","train_set","[","0","]",">",">",">","test_set","=","WILDRECEIPT","(","train=False",",","img_folder=","''","\/path\/to\/wildreceipt\/","''",",",">",">",">","label_path=","''","\/path\/to\/wildreceipt\/test.txt","''",")",">",">",">","img",",","target","=","test_set","[","0","]","Args",":","--","--","img_folder",":","folder","with","all","the","images","of","the","dataset","label_path",":","path","to","the","annotations","file","of","the","dataset","train",":","whether","the","subset","should","be","the","training","one","use_polygons",":","whether","polygons","should","be","considered","as","rotated","bounding","box","(","instead","of","straight","ones",")","recognition_task",":","whether","the","dataset","should","be","used","for","recognition","task","*","*","kwargs",":","keyword","arguments","from","`","AbstractDataset","`","."]
code: def extra_repr(self) -> str:
      return f"train={self.train}"
  
file_path: doctr/doctr/datasets/wildreceipt.py
imports: import json
  import os
  from pathlib import Path
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  from .datasets import AbstractDataset
  from .utils import convert_target_to_relative, crop_bboxes_from_image
label_desc: Use image node_id 2 for calling the WILDRECEIPT obj's underlying member method code with example usage: obj.extra_repr() and returns: str, self