andrewluo commited on
Commit
9de4d5f
·
verified ·
1 Parent(s): a95110a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - object-detection
4
+ - rf-detr
5
+ - commonforms
6
+ datasets:
7
+ - jbarrow/CommonForms
8
+ ---
9
+
10
+ # RF-DETR Fine-tuned on CommonForms
11
+
12
+ This model is an RF-DETR (small) fine-tuned on the [CommonForms](jbarrow/CommonForms) dataset for form field detection.
13
+
14
+ ## Model Details
15
+
16
+ - **Model Type:** RF-DETR small
17
+ - **Dataset:** jbarrow/CommonForms
18
+ - **Classes:** 3
19
+ - **Epochs:** 1
20
+ - **Batch Size:** 4 (grad_accum: 4)
21
+
22
+ ## Classes
23
+
24
+ [
25
+ {
26
+ "id": 0,
27
+ "name": "class_0",
28
+ "supercategory": "form_element"
29
+ },
30
+ {
31
+ "id": 1,
32
+ "name": "class_1",
33
+ "supercategory": "form_element"
34
+ },
35
+ {
36
+ "id": 2,
37
+ "name": "class_2",
38
+ "supercategory": "form_element"
39
+ }
40
+ ]
41
+
42
+ ## Usage
43
+
44
+ ```python
45
+ import torch
46
+ from PIL import Image
47
+
48
+ # Load model
49
+ model_path = "path/to/rfdetr_model.pt"
50
+ # Note: You'll need the rfdetr library installed
51
+ from rfdetr import RFDETRSmall
52
+
53
+ model = RFDETRSmall()
54
+ model.load_state_dict(torch.load(model_path))
55
+ model.eval()
56
+
57
+ # Run inference
58
+ image = Image.open("form.jpg")
59
+ predictions = model.predict(image)
60
+ print(predictions)
61
+ ```
62
+
63
+ ## Training Details
64
+
65
+ - Learning Rate: 0.0001
66
+ - Effective Batch Size: 16
67
+ - Dataset: Trained on CommonForms (form field detection)
68
+
69
+ ## Metrics
70
+
71
+ (Add your evaluation metrics here after running evaluation)
72
+
73
+ ## Citation
74
+
75
+ ```bibtex
76
+ @misc{rfdetr-commonforms,
77
+ author = {Your Name},
78
+ title = {RF-DETR Fine-tuned on CommonForms},
79
+ year = {2024},
80
+ publisher = {HuggingFace},
81
+ howpublished = {\url{https://huggingface.co/andrewluo/rfdetr-commonforms-test}}
82
+ }
83
+ ```