Martin Krockert commited on
Commit
fa54254
·
1 Parent(s): bbf40b2

Demo with tesseract / paddle and finetuned yolo 12

Browse files
.gitignore ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ tox/
40
+ nox/
41
+ coverage
42
+ coverage.*
43
+ cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ hypothesis/
49
+ pytest_cache/
50
+ cover/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+ db.sqlite3
60
+ db.sqlite3-journal
61
+
62
+ # Flask stuff:
63
+ instance/
64
+ webassets-cache
65
+
66
+ # Scrapy stuff:
67
+ scrapy
68
+
69
+ # Sphinx documentation
70
+ docs/_build/
71
+
72
+ # PyBuilder
73
+ pybuilder/
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ python-version
85
+
86
+ # pipenv
87
+ #Pipfile.lock
88
+
89
+ # poetry
90
+ #poetry.lock
91
+
92
+ # pdm
93
+ pdm.toml
94
+ pdm-python
95
+ pdm-build/
96
+
97
+ # PEP 582
98
+ __pypackages__/
99
+
100
+ # Celery
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath
105
+ *.sage.py
106
+
107
+ # Environments
108
+ env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder
117
+ spyderproject
118
+ spyproject
119
+
120
+ # Rope
121
+ ropeproject
122
+
123
+ # mkdocs
124
+ /site
125
+
126
+ # mypy
127
+ mypy_cache/
128
+ dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre
132
+ pyre/
133
+
134
+ # pytype
135
+ pytype/
136
+
137
+ # Cython
138
+ cython_debug/
139
+
140
+ # PyCharm
141
+ # .idea/
app.py CHANGED
@@ -1,7 +1,144 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import numpy as np
3
+ import cv2
4
+ import os
5
+ from ultralytics import YOLO
6
+ from PIL import Image
7
+ from src.table_ocr import TableEx
8
+ from src.datum_ocr import DatumOCR
9
+ from src.categories import CATEGORIES as categories, generate_colors
10
 
11
+ os.environ['TESSDATA_PREFIX'] = './tessdata'
 
12
 
13
+ def load_model():
14
+ """Load the custom YOLO model using Ultralytics"""
15
+ # Load the model using the Ultralytics YOLO class
16
+ model = YOLO('src/yoloCADex.pt')
17
+ model.to('cpu')
18
+ return model
19
+
20
+
21
+ def process_image(image):
22
+ """Process the uploaded image with the YOLO model and return the results"""
23
+
24
+ # Check if image is valid
25
+ if image is None or not isinstance(image, Image.Image):
26
+ return None, {"error": "Invalid image input"}, None, None, None
27
+
28
+ model = load_model()
29
+ category_colors = generate_colors(len(categories))
30
+ img_array = np.array(image) # Convert to format expected by the model
31
+ table_extractor = TableEx() # Initialize TableEx for table extraction
32
+ date_extractor = DatumOCR() # Initialize DatumOCR for OCR
33
+ results = model(img_array) # Run inference with CPU specified
34
+ img_with_boxes = img_array.copy() # Create a copy of the image for drawing
35
+ detections = [] # Initialize results table
36
+
37
+ table_data = [] # Storage for extracted table data and images
38
+ table_images = []
39
+
40
+ gdnt_data = [] # Storage for extracted table data and images
41
+ surface_data = []
42
+
43
+
44
+ # Process results
45
+ for result in results:
46
+ boxes = result.boxes
47
+ for box in boxes:
48
+ # Get box coordinates
49
+ x1, y1, x2, y2 = map(int, box.xyxy[0])
50
+
51
+ # Get confidence and class
52
+ conf = float(box.conf[0])
53
+ cls_id = int(box.cls[0])
54
+
55
+ if cls_id < len(categories):
56
+ cls_name = categories[cls_id]
57
+ color = category_colors[cls_id]
58
+
59
+ if cls_name == "table":
60
+ table_region, extracted_info = table_extractor.extract_table_data(img_array, x1, y1, x2, y2)
61
+ if table_region is not None:
62
+ table_images.append(table_region)
63
+ if extracted_info is not None:
64
+ table_data.append(extracted_info)
65
+ else:
66
+ cls_name = f"Unknown ({cls_id})"
67
+ color = (255, 255, 255) # White for unknown categories
68
+
69
+ label = f"{cls_name} {conf:.2f}"
70
+
71
+ # Draw rectangle with category-specific color
72
+ cv2.rectangle(img_with_boxes, (x1, y1), (x2, y2), color, 2)
73
+
74
+ # Create a filled rectangle for text background
75
+ text_size = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.5, 2)[0]
76
+ cv2.rectangle(img_with_boxes, (x1, y1 - text_size[1] - 10), (x1 + text_size[0], y1), color, -1)
77
+
78
+ # Add label with contrasting text color
79
+ # Choose black or white text based on background brightness
80
+ brightness = (color[0] + color[1] + color[2]) / 3
81
+ text_color = (0, 0, 0) if brightness > 127 else (255, 255, 255)
82
+ cv2.putText(img_with_boxes, label, (x1, y1 - 5), cv2.FONT_HERSHEY_SIMPLEX, 0.5, text_color, 2)
83
+
84
+ # Store detection for table with color information
85
+ detections.append({
86
+ "category": cls_name,
87
+ "confidence": conf,
88
+ "position": (x1, y1, x2, y2),
89
+ "color": color
90
+ })
91
+
92
+
93
+ # Extract GD&T and Datum OCR information
94
+ gdnt_info = date_extractor.read_rois(img_array, [4], boxes, 0)
95
+ if gdnt_info is not None:
96
+ gdnt_data.append(gdnt_info)
97
+
98
+ surface_info = date_extractor.read_rois(img_array, [3,6,8,9,10,11], boxes, 0)
99
+ if surface_info is not None:
100
+ surface_data.append(surface_info)
101
+
102
+ # If we have detected tables but no extracted images, handle that case
103
+ if len(table_data) > 0 and len(table_images) == 0:
104
+ table_images = [Image.fromarray(np.zeros((100, 100, 3), dtype=np.uint8))]
105
+
106
+ # Return the detection result image, any extracted table image, and the JSON data
107
+ return (
108
+ Image.fromarray(img_with_boxes), # Main detection image
109
+ table_images[0] if table_images else None, # First table image or None
110
+ table_data[0] if len(table_data) == 1 else table_data, # JSON data for gr.JSON
111
+ gdnt_data[0] if len(gdnt_data) == 1 else table_data, # JSON data for gr.JSON
112
+ surface_data[0] if len(surface_data) == 1 else table_data # JSON data for gr.JSON
113
+ )
114
+
115
+ # Create Gradio interface
116
+ with gr.Blocks(title="CAD 2d Drawing Data Extraction") as app:
117
+ gr.Markdown("# CAD 2d Drawing Data Extraction")
118
+ gr.Markdown("Upload an image to detect objects. Tables will be automatically extracted.")
119
+
120
+ with gr.Row():
121
+ with gr.Column(scale=2):
122
+ input_image = gr.Image(type="pil", label="Input Image")
123
+ gr.Markdown("## Extracted Table Region")
124
+ table_image = gr.Image()
125
+ gr.Markdown("### Extracted GD&T Data")
126
+ gdnt_json = gr.JSON(open=True)
127
+ gr.Markdown("### Extracted Surface Data")
128
+ surface_json = gr.JSON(open=True)
129
+ with gr.Column(scale=3):
130
+ submit_btn = gr.Button("Detect Objects", variant="primary")
131
+ gr.Markdown("## Detection Results")
132
+ output_image = gr.Image()
133
+ gr.Markdown("### Extracted Table Data")
134
+ table_json = gr.JSON(open=True)
135
+
136
+ submit_btn.click(
137
+ fn=process_image,
138
+ inputs=[input_image],
139
+ outputs=[output_image, table_image, table_json, gdnt_json, surface_json]
140
+ )
141
+
142
+ # Launch the app
143
+ if __name__ == "__main__":
144
+ app.launch()
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ tesseract-ocr-all
requirements.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ torch
2
+ ultralytics
3
+ gradio
4
+ supervision
5
+ paddlepaddle==3.0.0rc1
6
+ paddleocr==2.9.1
7
+ opencv-python
8
+ Pillow
9
+ numpy
10
+ pandas
11
+ scipy
12
+ pytesseract
13
+ sentence_transformers
14
+ html_to_json
src/__init__.py ADDED
File without changes
src/categories.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import colorsys
2
+
3
+ # Define the categories
4
+ CATEGORIES = ["info", "table", "part", "surface-all", "GD&T", "zoom", "surface-trie",
5
+ "3D", "edge", "surface-check", "corner", "surface-ball", "info-table"]
6
+
7
+
8
+
9
+ # Generate distinct colors for each category
10
+ def generate_colors(n):
11
+ colors = []
12
+ for i in range(n):
13
+ # Use HSV color space to generate evenly distributed distinct colors
14
+ hue = i / n
15
+ sat = 0.8 + (i % 3) * 0.1 # Vary saturation slightly
16
+ val = 0.8 + (i % 2) * 0.1 # Vary value slightly
17
+
18
+ # Convert to RGB
19
+ rgb = colorsys.hsv_to_rgb(hue, sat, val)
20
+
21
+ # Convert to BGR (for OpenCV) and scale to 0-255
22
+ bgr = (int(rgb[2] * 255), int(rgb[1] * 255), int(rgb[0] * 255))
23
+ colors.append(bgr)
24
+ return colors
src/datum_ocr.py ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ import pytesseract
3
+ from paddleocr import PaddleOCR
4
+ from scipy import ndimage
5
+ import supervision as sv
6
+ import numpy as np
7
+ import math
8
+
9
+ from src.categories import CATEGORIES as categories
10
+
11
+
12
+ symbol_map = {
13
+ "⏤": 'Straightness',
14
+ "⏥": 'Flatness',
15
+ "⌭": 'Cylindricity',
16
+ "○": 'Circularity',
17
+ "⌯": 'Symmetry',
18
+ "⌖": 'Position',
19
+ "◎": 'Concentricity',
20
+ "⟂": 'Perpendicularity',
21
+ "∥": 'Parallelism',
22
+ "∠": 'Angularity',
23
+ "⌓": 'Profile of a surface',
24
+ "⌒": 'Profile of a line',
25
+ "⌰": 'Total run-out',
26
+ "↗": 'Circular run-out'
27
+ }
28
+ feature_symbol_map = {
29
+ 'Ⓕ': '(Free state)',
30
+ 'Ⓛ': '(LMC)',
31
+ 'Ⓜ': '(MMC)',
32
+ 'Ⓟ': '(Projected tolerance zone)',
33
+ 'Ⓢ': '(RFS)',
34
+ 'Ⓣ': '(Tangent plane)',
35
+ 'Ⓤ': '(Unequal bilateral)'
36
+ }
37
+
38
+ class DatumOCR:
39
+ def __init__(self):
40
+ self.ocr = PaddleOCR(use_angle_cls=True, lang='en', show_log=False, use_gpu=False)
41
+
42
+
43
+ def crop_img(self, img: np.array, box: any, rotation: int = 0):
44
+ crop = sv.crop_image(image=img , xyxy=box.xyxy[0].detach().cpu().numpy())
45
+ crop = ndimage.rotate(crop, rotation)
46
+ return crop
47
+
48
+ def crop_by_id(self, img : np.array, id: int, boxes: any, rotation: int = 0):
49
+ boxes_of_interest = [self.crop_img(img, box, rotation) for box in boxes if box.cls.item() == id]
50
+ return boxes_of_interest
51
+
52
+ def split_contures(self, img : np.array):
53
+ # Preprocessing
54
+ gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
55
+ thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]
56
+
57
+ # Find contours
58
+ cnts, _ = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
59
+ contours = []
60
+ # Filter for rectangles and squares
61
+ for c in cnts:
62
+ peri = cv2.arcLength(c, True)
63
+ approx = cv2.approxPolyDP(c, 0.04 * peri, True)
64
+ area = cv2.contourArea(c)
65
+ if len(approx) == 4 and area > 200:
66
+ x, y, w, h = cv2.boundingRect(c)
67
+ contours.append((x, y, w, h))
68
+ #cv2.drawContours(image, [approx], -1, (0, 255, 0), 3)
69
+ contours.sort(key=lambda rect: rect[0])
70
+ return contours
71
+
72
+ def clense_lines(self, img: np.array, linesize : int = 10):
73
+ """ Input the full label of gd&t as img
74
+ i.e.
75
+ _______________
76
+ | o | 0.2 | A |
77
+ '-------------'
78
+ """
79
+ clensed = img.copy()
80
+ gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
81
+ thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1]
82
+
83
+ # Remove horizontal lines
84
+ horizontal_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (linesize,1))
85
+ remove_horizontal = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, horizontal_kernel, iterations=2)
86
+ cnts = cv2.findContours(remove_horizontal, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
87
+ cnts = cnts[0] if len(cnts) == 2 else cnts[1]
88
+ for c in cnts:
89
+ cv2.drawContours(clensed, [c], -1, (255,255,255), 2)
90
+
91
+ # Remove vertical lines
92
+ vertical_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (1,linesize))
93
+ remove_vertical = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, vertical_kernel, iterations=2)
94
+ cnts = cv2.findContours(remove_vertical, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
95
+ cnts = cnts[0] if len(cnts) == 2 else cnts[1]
96
+ for c in cnts:
97
+ cv2.drawContours(clensed, [c], -1, (255,255,255), 2)
98
+ return clensed
99
+
100
+
101
+ def read_contures(self, rect, clensed : np.array, math_recognition : bool = True):
102
+ """
103
+ Input:
104
+ grouped_rectangles: list of rect coordinates with x,y,w,h
105
+ clensed : preprocessed image to read from
106
+ """
107
+ pix = []
108
+ first = math_recognition # as if no math recognition it should always use paddle
109
+ text = []
110
+
111
+ #reverse = lines[::-1].copy()
112
+ for i, rect in enumerate(rect):
113
+ x, y, w, h = rect
114
+ roi = clensed[y:y+h, x:x+w]
115
+ if first:
116
+ custom_config = r'--oem 3 -l eng_gdt --psm 6'
117
+ first = False
118
+ gdt = self.ocr_gdt(roi, custom_config)
119
+ else:
120
+ if math_recognition:
121
+ custom_config = r'--oem 3 -l eng_math --psm 6'
122
+ gdt = self.ocr_gdt(roi, custom_config)
123
+ else:
124
+ gdt = self.ocr_paddle(roi)
125
+ text.append(gdt)
126
+ pix.append(roi)
127
+
128
+ return text, pix
129
+
130
+ def ocr_gdt(self, img: np.array, custom_config: str, debug : bool = False):
131
+ gdt = []
132
+ text_ex = pytesseract.image_to_data(img, config=custom_config, output_type='data.frame')
133
+ text_ex = text_ex[text_ex.conf != -1]
134
+ if len(text_ex['text']) == 1:
135
+ item = text_ex['text'].item()
136
+ gdt.append(str(item))
137
+ if item in symbol_map:
138
+ gdt.append(symbol_map[item])
139
+ elif item in feature_symbol_map:
140
+ gdt.append(feature_symbol_map[item])
141
+ if debug:
142
+ print('gdt - ' + item)
143
+ else:
144
+ gdt.append('not readable')
145
+ return gdt
146
+
147
+ def ocr_paddle(self, roi, debug: bool = False):
148
+ gdt = []
149
+ ocr_res = self.ocr.ocr(roi, cls=False, det=False, rec=True)
150
+ for idx in range(len(ocr_res)):
151
+ res = ocr_res[idx]
152
+ if res is not None:
153
+ for line in res:
154
+ gdt.append(str(line[0]))
155
+ if debug:
156
+ print('txt - ' + str(line[1][0]))
157
+ return gdt
158
+
159
+ def read_rois(self, sv_image: np.array, classes_to_detect: list[int], boxes: any, rotation: int):
160
+ """
161
+ Split up the result regions and try to read them -> result is Returned as an 2D array of Strings and an array of images as np.array
162
+ sv_image = the full image to analize
163
+ class_to_detect = 4 (GD&T) or 6 (surface)
164
+ boxes = resulting boxes from YOLO (mostly ~ results[0].boxes)
165
+ rotation = angle the image needs to be rotated
166
+ """
167
+ res = []
168
+
169
+ for class_to_detect in classes_to_detect:
170
+ if class_to_detect == 4:
171
+ remove_table_structure = True
172
+ else:
173
+ remove_table_structure = False
174
+ boi = self.crop_by_id(sv_image, class_to_detect, boxes, rotation)
175
+ # clensed = clense_lines(sv_image)
176
+ #sv.plot_image(image=clensed)
177
+ for b in boi:
178
+ if min(b.shape) == 0:
179
+ continue
180
+ lines = self.read_roi(b, remove_table_structure, rotation)
181
+ res.append(f"{categories[class_to_detect]} : {lines}")
182
+ return res
183
+
184
+ def read_roi(self, b: np.array, remove_table_structure: bool , rotation: int):
185
+ # turn 90 degree if wrong aligned
186
+ h, w, _ = b.shape
187
+ threshold = 1.1
188
+ if h > w*threshold:
189
+ rot = -90
190
+ if rotation == 180:
191
+ rot = rot + 180
192
+ b = ndimage.rotate(b, rot)
193
+
194
+ if(remove_table_structure):
195
+ rect = self.split_contures(b)
196
+ linesize = math.ceil(max(b.shape)*0.10)-1
197
+ clensed = self.clense_lines(b, linesize)
198
+ else :
199
+ w, h, _ = b.shape
200
+ rect = [(0,0, h, w)]
201
+ clensed = b
202
+
203
+ #preprocessing
204
+ kernel = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]])
205
+ # Apply the sharpening kernel
206
+ sharpened_image = cv2.filter2D(clensed , -1, kernel)
207
+ # thresholding
208
+ _, thresh_img = cv2.threshold(sharpened_image, 128, 255, 0, cv2.THRESH_BINARY)
209
+
210
+ #[print(c) for c in rect]
211
+
212
+ lines, pix = self.read_contures(rect, thresh_img, remove_table_structure)
213
+ return lines #, pix, thresh_img
src/table_ocr.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import re # regex
3
+ import numpy as np
4
+ import PIL.Image as Image
5
+ from paddleocr import PPStructure
6
+ import html_to_json
7
+
8
+
9
+ class TableEx:
10
+ def __init__(self):
11
+ self.table_engine = PPStructure(lang='en', layout=False, show_log=True, use_gpu=False, download_models=True, rec=True)
12
+
13
+ def extract_table_information(self, pil_image : np.array):
14
+ #img_byte_arr = toBytes(pil_image)
15
+ #table_engine = PPStructure(lang='en', recovery=True, ocr=True, show_log=True, mode='kie')
16
+ result = self.table_engine(pil_image)
17
+ try:
18
+ extracted_tables = html_to_json.convert_tables(result[0]['res']['html'])
19
+ extracted_tables = self.remove_empty_elements(extracted_tables)
20
+ except Exception as e:
21
+ print('Structure extraction Failed, using fallback plain text.')
22
+ x = [x['text'] for x in result[0]['res']]
23
+ extracted_tables = ' '.join(x)
24
+ return extracted_tables
25
+
26
+ def remove_empty_elements(self, nested_list):
27
+ """
28
+ Recursively removes empty elements from a nested list.
29
+ """
30
+ cleaned_list = []
31
+ for item in nested_list:
32
+ if isinstance(item, list):
33
+ # Recurse into sublists
34
+ cleaned_sublist = self.remove_empty_elements(item)
35
+ if cleaned_sublist:
36
+ cleaned_list.append(cleaned_sublist)
37
+ elif item != '':
38
+ # Add non-empty items to the cleaned list
39
+ cleaned_list.append(item)
40
+ return cleaned_list
41
+
42
+ def extract_table_data(self, img_array, x1, y1, x2, y2):
43
+ # Crop the detected table region
44
+ table_region = img_array[max(0, y1):min(img_array.shape[0], y2),
45
+ max(0, x1):min(img_array.shape[1], x2)]
46
+
47
+ if table_region.size > 0 and table_region.shape[0] > 0 and table_region.shape[1] > 0:
48
+ try:
49
+ # Save the table image for display
50
+ table_images = Image.fromarray(table_region)
51
+ # Extract table data
52
+ extracted_info = self.extract_table_information(table_region)
53
+ # Store the extracted data with position info
54
+ table_data = extracted_info[0]
55
+
56
+ except Exception as e:
57
+ print(f"Error extracting table data: {e}")
58
+ table_data = {
59
+ "region": f"({x1}, {y1}) to ({x2}, {y2})",
60
+ "error": str(e),
61
+ "data": None
62
+ }
63
+ return table_images, table_data
src/utils/___init__.py ADDED
File without changes
src/utils/imageFormater.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import PIL.Image
2
+ import numpy as nd
3
+ import cv2
4
+ import io
5
+ import base64
6
+ from io import BytesIO
7
+
8
+ def toPIL(array: nd.array) -> PIL.Image:
9
+ return PIL.Image.fromarray(array).convert('RGB')
10
+
11
+ def toBytes(pilImage : PIL.Image) -> bytes:
12
+ img_byte_arr = io.BytesIO()
13
+ pilImage.save(img_byte_arr, format='JPEG')
14
+ return img_byte_arr.getvalue()
15
+
16
+ def toBASE64(pilImage : PIL.Image) -> str:
17
+ buffered = BytesIO()
18
+ pilImage.save(buffered, format="JPEG")
19
+ img_str = base64.b64encode(buffered.getvalue())
20
+
21
+
22
+ def redLines(bgr) -> nd.array:
23
+ # Convert the image to grayscale#
24
+ if len(bgr) == 0:
25
+ return bgr
26
+
27
+ cont = bgr.copy()
28
+ gray = cv2.cvtColor(bgr, cv2.COLOR_BGR2GRAY)
29
+
30
+ # Threshold the image to create a binary mask
31
+ _, thresh = cv2.threshold(gray, 128, 255, cv2.THRESH_BINARY_INV)
32
+
33
+ # Set the line size (adjust as needed)
34
+ linesize = 25
35
+
36
+ # Remove horizontal lines
37
+ horizontal_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (linesize, 1))
38
+ remove_horizontal = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, horizontal_kernel, iterations=2)
39
+ cnts = cv2.findContours(remove_horizontal, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
40
+ cnts = cnts[0] if len(cnts) == 2 else cnts[1]
41
+ for c in cnts:
42
+ cv2.drawContours(cont, [c], -1, (255, 0, 0), 2) # Draw in red
43
+
44
+ # Remove vertical lines
45
+ vertical_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (1, linesize))
46
+ remove_vertical = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, vertical_kernel, iterations=2)
47
+ cnts = cv2.findContours(remove_vertical, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
48
+ cnts = cnts[0] if len(cnts) == 2 else cnts[1]
49
+ for c in cnts:
50
+ cv2.drawContours(cont, [c], -1, (255, 0, 0), 2) # Draw in red
51
+
52
+ return cont
53
+
54
+
55
+
src/utils/rotation.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+
3
+ def predict(yolo_result : any
4
+ ,img : Image = None) -> int:
5
+ """
6
+ pedicts the orientation based on the position of the largest table anotation and returns a degree the image should be rotated.
7
+
8
+ input:
9
+ yolo_result : for one image
10
+ img : PIL Image, default None
11
+ if None the image from result is taken
12
+ """
13
+ result = yolo_result
14
+ boxes = result.boxes # Boxes object for bounding box outputs
15
+ # masks = result.masks # Masks object for segmentation masks outputs
16
+ # keypoints = result.keypoints # Keypoints object for pose outputs
17
+ # probs = result.probs # Probs object for classification outputs
18
+ if img is None:
19
+ img = result.plot() # BGR-order numpy array
20
+ img = Image.fromarray(img[..., ::-1]) # RGB-order PIL image
21
+
22
+ box_with_max_volume = get_reference_table(boxes)
23
+ if box_with_max_volume == None:
24
+ return 0 #early return if nothing found.
25
+
26
+ # Get the coordinates of the box with the largest volume
27
+ x1, y1, x2, y2 = box_with_max_volume.xyxy[0].tolist()
28
+
29
+ # Get the distances to the borders
30
+ dist_top = y1
31
+ dist_left = x1
32
+ dist_right = img.width - x2
33
+ dist_bottom = img.height - y2
34
+
35
+ # Determine the rotation angle based on the distances to the borders
36
+ if dist_top < dist_bottom and dist_left < dist_right: # top left corner
37
+ rotation_angle = 180 # Rotate by 180 degrees
38
+ elif dist_top < dist_bottom and dist_left >= dist_right: # top right corner
39
+ rotation_angle = -90 # Rotate by -90 degrees
40
+ elif dist_top > dist_bottom and dist_left < dist_right: # bottom left
41
+ rotation_angle = 90
42
+ else:
43
+ rotation_angle = 0 # do nothing
44
+
45
+ return rotation_angle # , box_with_max_volume
46
+ # Rotate the original image by the calculated angle
47
+ # rotated_image = img.rotate(rotation_angle, expand=True)
48
+
49
+
50
+ def get_reference_table(boxes):
51
+ """
52
+ Returns the reference table from result
53
+ """
54
+ # get all tables by class id
55
+ tables = [box for box in boxes if box.cls.item() == 1]
56
+ if len(tables) == 0:
57
+ return None
58
+ # detect box with the largest volume
59
+ box_with_max_volume = max(
60
+ tables,
61
+ key=lambda box: (box.xywhn[0][2].item() * box.xywhn[0][3].item())
62
+ )
63
+
64
+ # retun the biggest box
65
+ return box_with_max_volume
tessdata/eng_gdt.traineddata ADDED
Binary file (552 kB). View file
 
tessdata/eng_math.traineddata ADDED
Binary file (536 kB). View file
 
weights/yoloCADex.pt ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html class="">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
6
+ <meta name="description" content="We’re on a journey to advance and democratize artificial intelligence through open source and open science." />
7
+ <meta property="fb:app_id" content="1321688464574422" />
8
+ <meta name="twitter:card" content="summary_large_image" />
9
+ <meta name="twitter:site" content="@huggingface" />
10
+ <meta name="twitter:image" content="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/krockema/YoloCadExtract.png" />
11
+ <meta property="og:title" content="yoloCADex.pt · krockema/YoloCadExtract at main" />
12
+ <meta property="og:type" content="website" />
13
+ <meta property="og:url" content="https://huggingface.co/krockema/YoloCadExtract/blob/main/yoloCADex.pt" />
14
+ <meta property="og:image" content="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/krockema/YoloCadExtract.png" />
15
+
16
+ <link rel="stylesheet" href="/front/build/kube-a3d300f/style.css" />
17
+
18
+ <link rel="preconnect" href="https://fonts.gstatic.com" />
19
+ <link
20
+ href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
21
+ rel="stylesheet"
22
+ />
23
+ <link
24
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&display=swap"
25
+ rel="stylesheet"
26
+ />
27
+
28
+ <link
29
+ rel="preload"
30
+ href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css"
31
+ as="style"
32
+ onload="this.onload=null;this.rel='stylesheet'"
33
+ />
34
+ <noscript>
35
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" />
36
+ </noscript>
37
+
38
+ <script>const guestTheme = document.cookie.match(/theme=(\w+)/)?.[1]; document.documentElement.classList.toggle('dark', guestTheme === 'dark' || ( (!guestTheme || guestTheme === 'system') && window.matchMedia('(prefers-color-scheme: dark)').matches));</script>
39
+ <link rel="canonical" href="https://huggingface.co/krockema/YoloCadExtract/blob/main/yoloCADex.pt">
40
+
41
+ <title>yoloCADex.pt · krockema/YoloCadExtract at main</title>
42
+
43
+ <script
44
+ defer
45
+ data-domain="huggingface.co"
46
+ event-loggedIn="false"
47
+ src="/js/script.pageview-props.js"
48
+ ></script>
49
+ <script>
50
+ window.plausible =
51
+ window.plausible ||
52
+ function () {
53
+ (window.plausible.q = window.plausible.q || []).push(arguments);
54
+ };
55
+ </script>
56
+ <script>
57
+ window.hubConfig = {"features":{"signupDisabled":false},"sshGitUrl":"[email protected]","moonHttpUrl":"https:\/\/huggingface.co","captchaApiKey":"bd5f2066-93dc-4bdd-a64b-a24646ca3859","captchaDisabledOnSignup":true,"datasetViewerPublicUrl":"https:\/\/datasets-server.huggingface.co","stripePublicKey":"pk_live_x2tdjFXBCvXo2FFmMybezpeM00J6gPCAAc","environment":"production","userAgent":"HuggingFace (production)","spacesIframeDomain":"hf.space","spacesApiUrl":"https:\/\/api.hf.space","docSearchKey":"ece5e02e57300e17d152c08056145326e90c4bff3dd07d7d1ae40cf1c8d39cb6","logoDev":{"apiUrl":"https:\/\/img.logo.dev\/","apiKey":"pk_UHS2HZOeRnaSOdDp7jbd5w"}};
58
+ </script>
59
+ <script type="text/javascript" src="https://de5282c3ca0c.edge.sdk.awswaf.com/de5282c3ca0c/526cf06acb0d/challenge.js" defer></script>
60
+ </head>
61
+ <body class="flex flex-col min-h-dvh bg-white dark:bg-gray-950 text-black ViewerBlobPage">
62
+ <div class="flex min-h-dvh flex-col"><div class="SVELTE_HYDRATER contents" data-target="SystemThemeMonitor" data-props="{&quot;isLoggedIn&quot;:false}"></div>
63
+
64
+ <div class="SVELTE_HYDRATER contents" data-target="MainHeader" data-props="{&quot;classNames&quot;:&quot;&quot;,&quot;isWide&quot;:false,&quot;isZh&quot;:false,&quot;isPro&quot;:false}"><header class="border-b border-gray-100 "><div class="w-full px-4 container flex h-16 items-center"><div class="flex flex-1 items-center"><a class="mr-5 flex flex-none items-center lg:mr-6" href="/"><img alt="Hugging Face's logo" class="w-7 md:mr-2" src="/front/assets/huggingface_logo-noborder.svg">
65
+ <span class="hidden whitespace-nowrap text-lg font-bold md:block">Hugging Face</span></a>
66
+ <div class="relative flex-1 lg:max-w-sm mr-2 sm:mr-4 md:mr-3 xl:mr-6"><input autocomplete="off" class="w-full dark:bg-gray-950 pl-8 form-input-alt h-9 pr-3 focus:shadow-xl " name="" placeholder="Search models, datasets, users..." spellcheck="false" type="text" value="">
67
+ <svg class="absolute left-2.5 text-gray-400 top-1/2 transform -translate-y-1/2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M30 28.59L22.45 21A11 11 0 1 0 21 22.45L28.59 30zM5 14a9 9 0 1 1 9 9a9 9 0 0 1-9-9z" fill="currentColor"></path></svg>
68
+ </div>
69
+ <div class="flex flex-none items-center justify-center p-0.5 place-self-stretch lg:hidden"><button class="relative z-40 flex h-6 w-8 items-center justify-center" type="button"><svg width="1em" height="1em" viewBox="0 0 10 10" class="text-xl" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" preserveAspectRatio="xMidYMid meet" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.65039 2.9999C1.65039 2.8066 1.80709 2.6499 2.00039 2.6499H8.00039C8.19369 2.6499 8.35039 2.8066 8.35039 2.9999C8.35039 3.1932 8.19369 3.3499 8.00039 3.3499H2.00039C1.80709 3.3499 1.65039 3.1932 1.65039 2.9999ZM1.65039 4.9999C1.65039 4.8066 1.80709 4.6499 2.00039 4.6499H8.00039C8.19369 4.6499 8.35039 4.8066 8.35039 4.9999C8.35039 5.1932 8.19369 5.3499 8.00039 5.3499H2.00039C1.80709 5.3499 1.65039 5.1932 1.65039 4.9999ZM2.00039 6.6499C1.80709 6.6499 1.65039 6.8066 1.65039 6.9999C1.65039 7.1932 1.80709 7.3499 2.00039 7.3499H8.00039C8.19369 7.3499 8.35039 7.1932 8.35039 6.9999C8.35039 6.8066 8.19369 6.6499 8.00039 6.6499H2.00039Z"></path></svg>
70
+ </button>
71
+
72
+ </div></div>
73
+ <nav aria-label="Main" class="ml-auto hidden lg:block"><ul class="flex items-center space-x-1.5 2xl:space-x-2"><li class="hover:text-indigo-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/models"><svg class="mr-1.5 text-gray-400 group-hover:text-indigo-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg>
74
+ Models</a>
75
+ </li><li class="hover:text-red-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/datasets"><svg class="mr-1.5 text-gray-400 group-hover:text-red-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 25 25"><ellipse cx="12.5" cy="5" fill="currentColor" fill-opacity="0.25" rx="7.5" ry="2"></ellipse><path d="M12.5 15C16.6421 15 20 14.1046 20 13V20C20 21.1046 16.6421 22 12.5 22C8.35786 22 5 21.1046 5 20V13C5 14.1046 8.35786 15 12.5 15Z" fill="currentColor" opacity="0.5"></path><path d="M12.5 7C16.6421 7 20 6.10457 20 5V11.5C20 12.6046 16.6421 13.5 12.5 13.5C8.35786 13.5 5 12.6046 5 11.5V5C5 6.10457 8.35786 7 12.5 7Z" fill="currentColor" opacity="0.5"></path><path d="M5.23628 12C5.08204 12.1598 5 12.8273 5 13C5 14.1046 8.35786 15 12.5 15C16.6421 15 20 14.1046 20 13C20 12.8273 19.918 12.1598 19.7637 12C18.9311 12.8626 15.9947 13.5 12.5 13.5C9.0053 13.5 6.06886 12.8626 5.23628 12Z" fill="currentColor"></path></svg>
76
+ Datasets</a>
77
+ </li><li class="hover:text-blue-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/spaces"><svg class="mr-1.5 text-gray-400 group-hover:text-blue-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 25 25"><path opacity=".5" d="M6.016 14.674v4.31h4.31v-4.31h-4.31ZM14.674 14.674v4.31h4.31v-4.31h-4.31ZM6.016 6.016v4.31h4.31v-4.31h-4.31Z" fill="currentColor"></path><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M3 4.914C3 3.857 3.857 3 4.914 3h6.514c.884 0 1.628.6 1.848 1.414a5.171 5.171 0 0 1 7.31 7.31c.815.22 1.414.964 1.414 1.848v6.514A1.914 1.914 0 0 1 20.086 22H4.914A1.914 1.914 0 0 1 3 20.086V4.914Zm3.016 1.102v4.31h4.31v-4.31h-4.31Zm0 12.968v-4.31h4.31v4.31h-4.31Zm8.658 0v-4.31h4.31v4.31h-4.31Zm0-10.813a2.155 2.155 0 1 1 4.31 0 2.155 2.155 0 0 1-4.31 0Z" fill="currentColor"></path><path opacity=".25" d="M16.829 6.016a2.155 2.155 0 1 0 0 4.31 2.155 2.155 0 0 0 0-4.31Z" fill="currentColor"></path></svg>
78
+ Spaces</a>
79
+ </li><li class="hover:text-yellow-700 max-xl:hidden"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/posts"><svg class="mr-1.5 text-gray-400 group-hover:text-yellow-500 text-yellow-500!" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 12 12" preserveAspectRatio="xMidYMid meet"><path fill="currentColor" fill-rule="evenodd" d="M3.73 2.4A4.25 4.25 0 1 1 6 10.26H2.17l-.13-.02a.43.43 0 0 1-.3-.43l.01-.06a.43.43 0 0 1 .12-.22l.84-.84A4.26 4.26 0 0 1 3.73 2.4Z" clip-rule="evenodd"></path></svg>
80
+ Posts</a>
81
+ </li><li class="hover:text-yellow-700"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/docs"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="mr-1.5 text-gray-400 group-hover:text-yellow-500" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><path d="m2.28 3.7-.3.16a.67.67 0 0 0-.34.58v8.73l.01.04.02.07.01.04.03.06.02.04.02.03.04.06.05.05.04.04.06.04.06.04.08.04.08.02h.05l.07.02h.11l.04-.01.07-.02.03-.01.07-.03.22-.12a5.33 5.33 0 0 1 5.15.1.67.67 0 0 0 .66 0 5.33 5.33 0 0 1 5.33 0 .67.67 0 0 0 1-.58V4.36a.67.67 0 0 0-.34-.5l-.3-.17v7.78a.63.63 0 0 1-.87.59 4.9 4.9 0 0 0-4.35.35l-.65.39a.29.29 0 0 1-.15.04.29.29 0 0 1-.16-.04l-.65-.4a4.9 4.9 0 0 0-4.34-.34.63.63 0 0 1-.87-.59V3.7Z" fill="currentColor" class="dark:opacity-40"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8 3.1a5.99 5.99 0 0 0-5.3-.43.66.66 0 0 0-.42.62v8.18c0 .45.46.76.87.59a4.9 4.9 0 0 1 4.34.35l.65.39c.05.03.1.04.16.04.05 0 .1-.01.15-.04l.65-.4a4.9 4.9 0 0 1 4.35-.34.63.63 0 0 0 .86-.59V3.3a.67.67 0 0 0-.41-.62 5.99 5.99 0 0 0-5.3.43l-.3.17L8 3.1Zm.73 1.87a.43.43 0 1 0-.86 0v5.48a.43.43 0 0 0 .86 0V4.97Z" fill="currentColor" class="opacity-40 dark:opacity-100"></path><path d="M8.73 4.97a.43.43 0 1 0-.86 0v5.48a.43.43 0 1 0 .86 0V4.96Z" fill="currentColor" class="dark:opacity-40"></path></svg>
82
+ Docs</a>
83
+ </li><li class="hover:text-black dark:hover:text-white"><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/enterprise"><svg class="mr-1.5 text-gray-400 group-hover:text-black dark:group-hover:text-white" xmlns="http://www.w3.org/2000/svg" fill="none" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 33 27"><path fill="currentColor" fill-rule="evenodd" d="M13.5.7a8.7 8.7 0 0 0-7.7 5.7L1 20.6c-1 3.1.9 5.7 4.1 5.7h15c3.3 0 6.8-2.6 7.8-5.7l4.6-14.2c1-3.1-.8-5.7-4-5.7h-15Zm1.1 5.7L9.8 20.3h9.8l1-3.1h-5.8l.8-2.5h4.8l1.1-3h-4.8l.8-2.3H23l1-3h-9.5Z" clip-rule="evenodd"></path></svg>
84
+ Enterprise</a>
85
+ </li>
86
+
87
+ <li><a class="group flex items-center px-2 py-0.5 dark:text-gray-300 dark:hover:text-gray-100" href="/pricing">Pricing
88
+ </a></li>
89
+
90
+ <li><div class="relative group">
91
+ <button class="px-2 py-0.5 hover:text-gray-500 dark:hover:text-gray-600 flex items-center " type="button">
92
+ <svg class=" text-gray-500 w-5 group-hover:text-gray-400 dark:text-gray-300 dark:group-hover:text-gray-100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 32 18" preserveAspectRatio="xMidYMid meet"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 3.30221C14.4504 2.836 14.8284 2.45807 15.2946 2.45807H28.4933C28.9595 2.45807 29.3374 2.836 29.3374 3.30221C29.3374 3.76842 28.9595 4.14635 28.4933 4.14635H15.2946C14.8284 4.14635 14.4504 3.76842 14.4504 3.30221Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 9.00002C14.4504 8.53382 14.8284 8.15588 15.2946 8.15588H28.4933C28.9595 8.15588 29.3374 8.53382 29.3374 9.00002C29.3374 9.46623 28.9595 9.84417 28.4933 9.84417H15.2946C14.8284 9.84417 14.4504 9.46623 14.4504 9.00002Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 14.6978C14.4504 14.2316 14.8284 13.8537 15.2946 13.8537H28.4933C28.9595 13.8537 29.3374 14.2316 29.3374 14.6978C29.3374 15.164 28.9595 15.542 28.4933 15.542H15.2946C14.8284 15.542 14.4504 15.164 14.4504 14.6978Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.94549 6.87377C2.27514 6.54411 2.80962 6.54411 3.13928 6.87377L6.23458 9.96907L9.32988 6.87377C9.65954 6.54411 10.194 6.54411 10.5237 6.87377C10.8533 7.20343 10.8533 7.73791 10.5237 8.06756L6.23458 12.3567L1.94549 8.06756C1.61583 7.73791 1.61583 7.20343 1.94549 6.87377Z" fill="currentColor"></path></svg>
93
+
94
+ </button>
95
+
96
+
97
+ </div></li>
98
+ <li><hr class="h-5 w-0.5 border-none bg-gray-100 dark:bg-gray-800"></li>
99
+ <li><a class="block cursor-pointer whitespace-nowrap px-2 py-0.5 hover:text-gray-500 dark:text-gray-300 dark:hover:text-gray-100" href="/login">Log In
100
+ </a></li>
101
+ <li><a class="whitespace-nowrap rounded-full border border-transparent bg-gray-900 px-3 py-1 leading-none text-white hover:border-black hover:bg-white hover:text-black" href="/join">Sign Up
102
+ </a></li></ul></nav></div></header></div>
103
+
104
+
105
+
106
+ <div class="SVELTE_HYDRATER contents" data-target="SSOBanner" data-props="{}"></div>
107
+
108
+
109
+
110
+ <main class="flex flex-1 flex-col"><div class="SVELTE_HYDRATER contents" data-target="ModelHeader" data-props="{&quot;activeTab&quot;:&quot;files&quot;,&quot;author&quot;:{&quot;_id&quot;:&quot;66217854acf8bd8a819de556&quot;,&quot;avatarUrl&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/66217854acf8bd8a819de556/SX7TwS36ZTblEeMiScC2Q.jpeg&quot;,&quot;fullname&quot;:&quot;Martin Krockert&quot;,&quot;name&quot;:&quot;krockema&quot;,&quot;type&quot;:&quot;user&quot;,&quot;isPro&quot;:false,&quot;isHf&quot;:false,&quot;isMod&quot;:false},&quot;canReadRepoSettings&quot;:false,&quot;canWriteRepoContent&quot;:false,&quot;canDisable&quot;:false,&quot;model&quot;:{&quot;author&quot;:&quot;krockema&quot;,&quot;cardData&quot;:{&quot;license&quot;:&quot;agpl-3.0&quot;},&quot;cardExists&quot;:true,&quot;createdAt&quot;:&quot;2025-03-14T08:27:17.000Z&quot;,&quot;discussionsDisabled&quot;:false,&quot;downloads&quot;:0,&quot;downloadsAllTime&quot;:0,&quot;id&quot;:&quot;krockema/YoloCadExtract&quot;,&quot;isLikedByUser&quot;:false,&quot;availableInferenceProviders&quot;:[],&quot;inference&quot;:&quot;&quot;,&quot;lastModified&quot;:&quot;2025-03-14T09:21:33.000Z&quot;,&quot;likes&quot;:0,&quot;librariesOther&quot;:[],&quot;trackDownloads&quot;:false,&quot;model-index&quot;:null,&quot;private&quot;:false,&quot;repoType&quot;:&quot;model&quot;,&quot;gated&quot;:false,&quot;pwcLink&quot;:{&quot;error&quot;:&quot;Unknown error, can't generate link to Papers With Code.&quot;},&quot;tags&quot;:[&quot;license:agpl-3.0&quot;,&quot;region:us&quot;],&quot;tag_objs&quot;:[{&quot;id&quot;:&quot;license:agpl-3.0&quot;,&quot;label&quot;:&quot;agpl-3.0&quot;,&quot;type&quot;:&quot;license&quot;},{&quot;type&quot;:&quot;region&quot;,&quot;label&quot;:&quot;🇺🇸 Region: US&quot;,&quot;id&quot;:&quot;region:us&quot;}],&quot;hasBlockedOids&quot;:false,&quot;region&quot;:&quot;us&quot;,&quot;isQuantized&quot;:false,&quot;inferenceStatic&quot;:&quot;library-not-detected&quot;,&quot;xetEnabled&quot;:false},&quot;discussionsStats&quot;:{&quot;closed&quot;:0,&quot;open&quot;:0,&quot;total&quot;:0},&quot;query&quot;:{},&quot;inferenceProviders&quot;:[{&quot;name&quot;:&quot;together&quot;,&quot;enabled&quot;:true,&quot;position&quot;:0,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;novita&quot;,&quot;enabled&quot;:true,&quot;position&quot;:1,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:true},{&quot;name&quot;:&quot;replicate&quot;,&quot;enabled&quot;:true,&quot;position&quot;:2,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;fal-ai&quot;,&quot;enabled&quot;:true,&quot;position&quot;:3,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:true},{&quot;name&quot;:&quot;fireworks-ai&quot;,&quot;enabled&quot;:true,&quot;position&quot;:4,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;nebius&quot;,&quot;enabled&quot;:true,&quot;position&quot;:5,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;sambanova&quot;,&quot;enabled&quot;:true,&quot;position&quot;:6,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;hyperbolic&quot;,&quot;enabled&quot;:true,&quot;position&quot;:7,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;cerebras&quot;,&quot;enabled&quot;:true,&quot;position&quot;:8,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:false},{&quot;name&quot;:&quot;hf-inference&quot;,&quot;enabled&quot;:true,&quot;position&quot;:9,&quot;isReleased&quot;:true,&quot;accuratePricing&quot;:true}]}"><header class="bg-linear-to-t border-b border-gray-100 pt-6 sm:pt-9 from-gray-50-to-white via-white dark:via-gray-950"><div class="container relative "><h1 class="flex flex-wrap items-center max-md:leading-tight mb-3 text-lg max-sm:gap-y-1.5 md:text-xl">
111
+ <div class="group flex flex-none items-center"><div class="relative mr-1 flex items-center">
112
+
113
+
114
+
115
+ <span class="inline-block "><span class="contents"><a href="/krockema" class="text-gray-400 hover:text-blue-600"><img alt="" class="w-3.5 h-3.5 rounded-full flex-none" src="https://cdn-avatars.huggingface.co/v1/production/uploads/66217854acf8bd8a819de556/SX7TwS36ZTblEeMiScC2Q.jpeg" crossorigin="anonymous"></a></span>
116
+ </span></div>
117
+
118
+
119
+ <span class="inline-block "><span class="contents"><a href="/krockema" class="text-gray-400 hover:text-blue-600">krockema</a></span>
120
+ </span>
121
+ <div class="mx-0.5 text-gray-300">/</div></div>
122
+
123
+ <div class="max-w-full "><a class="break-words font-mono font-semibold hover:text-blue-600 " href="/krockema/YoloCadExtract">YoloCadExtract</a>
124
+ <button class="relative text-sm mr-4 focus:outline-hidden inline-flex cursor-pointer items-center text-sm mx-0.5 text-gray-600 " title="Copy model name to clipboard" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
125
+
126
+ </button></div>
127
+ <div class="inline-flex items-center overflow-hidden whitespace-nowrap rounded-md border bg-white text-sm leading-none text-gray-500 mr-2"><button class="relative flex items-center overflow-hidden from-red-50 to-transparent dark:from-red-900 px-1.5 py-1 hover:bg-linear-to-t focus:outline-hidden" title="Like"><svg class="left-1.5 absolute" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" fill="currentColor"><path d="M22.45,6a5.47,5.47,0,0,1,3.91,1.64,5.7,5.7,0,0,1,0,8L16,26.13,5.64,15.64a5.7,5.7,0,0,1,0-8,5.48,5.48,0,0,1,7.82,0L16,10.24l2.53-2.58A5.44,5.44,0,0,1,22.45,6m0-2a7.47,7.47,0,0,0-5.34,2.24L16,7.36,14.89,6.24a7.49,7.49,0,0,0-10.68,0,7.72,7.72,0,0,0,0,10.82L16,29,27.79,17.06a7.72,7.72,0,0,0,0-10.82A7.49,7.49,0,0,0,22.45,4Z"></path></svg>
128
+
129
+
130
+ <span class="ml-4 pl-0.5 ">like</span></button>
131
+ <button class="focus:outline-hidden flex items-center border-l px-1.5 py-1 text-gray-400 hover:bg-gray-50 focus:bg-gray-100 dark:hover:bg-gray-900 dark:focus:bg-gray-800" title="See users who liked this repository">0</button></div>
132
+
133
+
134
+
135
+
136
+ </h1>
137
+ <div class="mb-3 flex flex-wrap md:mb-4"><div class="relative inline-block ">
138
+ <button class="group mr-1 mb-1 md:mr-1.5 md:mb-1.5 rounded-full rounded-br-none " type="button">
139
+ <div class="tag tag-white rounded-full relative rounded-br-none pr-2.5">
140
+ <svg class="text-xs text-gray-900" width="1em" height="1em" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.46009 5.0945V6.88125C1.46009 7.25201 1.75937 7.55129 2.13012 7.55129C2.50087 7.55129 2.80016 7.25201 2.80016 6.88125V5.0945C2.80016 4.72375 2.50087 4.42446 2.13012 4.42446C1.75937 4.42446 1.46009 4.72375 1.46009 5.0945ZM4.14022 5.0945V6.88125C4.14022 7.25201 4.4395 7.55129 4.81026 7.55129C5.18101 7.55129 5.48029 7.25201 5.48029 6.88125V5.0945C5.48029 4.72375 5.18101 4.42446 4.81026 4.42446C4.4395 4.42446 4.14022 4.72375 4.14022 5.0945ZM1.23674 9.78473H8.38377C8.75452 9.78473 9.0538 9.48545 9.0538 9.1147C9.0538 8.74395 8.75452 8.44466 8.38377 8.44466H1.23674C0.865993 8.44466 0.566711 8.74395 0.566711 9.1147C0.566711 9.48545 0.865993 9.78473 1.23674 9.78473ZM6.82036 5.0945V6.88125C6.82036 7.25201 7.11964 7.55129 7.49039 7.55129C7.86114 7.55129 8.16042 7.25201 8.16042 6.88125V5.0945C8.16042 4.72375 7.86114 4.42446 7.49039 4.42446C7.11964 4.42446 6.82036 4.72375 6.82036 5.0945ZM4.39484 0.623142L0.865993 2.48137C0.682851 2.57517 0.566711 2.76725 0.566711 2.97273C0.566711 3.28094 0.816857 3.53109 1.12507 3.53109H8.49991C8.80365 3.53109 9.0538 3.28094 9.0538 2.97273C9.0538 2.76725 8.93766 2.57517 8.75452 2.48137L5.22568 0.623142C4.9666 0.484669 4.65391 0.484669 4.39484 0.623142V0.623142Z" fill="currentColor"></path></svg>
141
+
142
+ <span class="-mr-1 text-gray-400">License:</span>
143
+
144
+ <span>agpl-3.0</span>
145
+
146
+
147
+ <div class="border-br-gray-200 absolute bottom-0.5 right-0.5 h-1 w-1 border-[3px] border-l-transparent border-t-transparent border-b-gray-200 border-r-gray-200 dark:border-b-gray-700 dark:border-r-gray-700"></div></div>
148
+
149
+ </button>
150
+
151
+
152
+ </div></div>
153
+
154
+ <div class="flex flex-col-reverse lg:flex-row lg:items-center lg:justify-between"><div class="-mb-px flex h-12 items-center overflow-x-auto overflow-y-hidden ">
155
+ <a class="tab-alternate" href="/krockema/YoloCadExtract"><svg class="mr-1.5 text-gray-400 flex-none" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg>
156
+ Model card
157
+
158
+
159
+
160
+ </a><a class="tab-alternate active" href="/krockema/YoloCadExtract/tree/main"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-tertiary" d="M21 19h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-8h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0 4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M9 19a1 1 0 0 1-1-1V6a1 1 0 0 1 2 0v12a1 1 0 0 1-1 1zm-6-4.333a1 1 0 0 1-.64-1.769L3.438 12l-1.078-.898a1 1 0 0 1 1.28-1.538l2 1.667a1 1 0 0 1 0 1.538l-2 1.667a.999.999 0 0 1-.64.231z" fill="currentColor"></path></svg>
161
+ <span class="xl:hidden">Files</span>
162
+ <span class="hidden xl:inline">Files and versions</span>
163
+
164
+
165
+
166
+ </a><a class="tab-alternate" href="/krockema/YoloCadExtract/discussions"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M20.6081 3C21.7684 3 22.8053 3.49196 23.5284 4.38415C23.9756 4.93678 24.4428 5.82749 24.4808 7.16133C24.9674 7.01707 25.4353 6.93643 25.8725 6.93643C26.9833 6.93643 27.9865 7.37587 28.696 8.17411C29.6075 9.19872 30.0124 10.4579 29.8361 11.7177C29.7523 12.3177 29.5581 12.8555 29.2678 13.3534C29.8798 13.8646 30.3306 14.5763 30.5485 15.4322C30.719 16.1032 30.8939 17.5006 29.9808 18.9403C30.0389 19.0342 30.0934 19.1319 30.1442 19.2318C30.6932 20.3074 30.7283 21.5229 30.2439 22.6548C29.5093 24.3704 27.6841 25.7219 24.1397 27.1727C21.9347 28.0753 19.9174 28.6523 19.8994 28.6575C16.9842 29.4379 14.3477 29.8345 12.0653 29.8345C7.87017 29.8345 4.8668 28.508 3.13831 25.8921C0.356375 21.6797 0.754104 17.8269 4.35369 14.1131C6.34591 12.058 7.67023 9.02782 7.94613 8.36275C8.50224 6.39343 9.97271 4.20438 12.4172 4.20438H12.4179C12.6236 4.20438 12.8314 4.2214 13.0364 4.25468C14.107 4.42854 15.0428 5.06476 15.7115 6.02205C16.4331 5.09583 17.134 4.359 17.7682 3.94323C18.7242 3.31737 19.6794 3 20.6081 3ZM20.6081 5.95917C20.2427 5.95917 19.7963 6.1197 19.3039 6.44225C17.7754 7.44319 14.8258 12.6772 13.7458 14.7131C13.3839 15.3952 12.7655 15.6837 12.2086 15.6837C11.1036 15.6837 10.2408 14.5497 12.1076 13.1085C14.9146 10.9402 13.9299 7.39584 12.5898 7.1776C12.5311 7.16799 12.4731 7.16355 12.4172 7.16355C11.1989 7.16355 10.6615 9.33114 10.6615 9.33114C10.6615 9.33114 9.0863 13.4148 6.38031 16.206C3.67434 18.998 3.5346 21.2388 5.50675 24.2246C6.85185 26.2606 9.42666 26.8753 12.0653 26.8753C14.8021 26.8753 17.6077 26.2139 19.1799 25.793C19.2574 25.7723 28.8193 22.984 27.6081 20.6107C27.4046 20.212 27.0693 20.0522 26.6471 20.0522C24.9416 20.0522 21.8393 22.6726 20.5057 22.6726C20.2076 22.6726 19.9976 22.5416 19.9116 22.222C19.3433 20.1173 28.552 19.2325 27.7758 16.1839C27.639 15.6445 27.2677 15.4256 26.746 15.4263C24.4923 15.4263 19.4358 19.5181 18.3759 19.5181C18.2949 19.5181 18.2368 19.4937 18.2053 19.4419C17.6743 18.557 17.9653 17.9394 21.7082 15.6009C25.4511 13.2617 28.0783 11.8545 26.5841 10.1752C26.4121 9.98141 26.1684 9.8956 25.8725 9.8956C23.6001 9.89634 18.2311 14.9403 18.2311 14.9403C18.2311 14.9403 16.7821 16.496 15.9057 16.496C15.7043 16.496 15.533 16.4139 15.4169 16.2112C14.7956 15.1296 21.1879 10.1286 21.5484 8.06535C21.7928 6.66715 21.3771 5.95917 20.6081 5.95917Z" fill="#FF9D00"></path><path d="M5.50686 24.2246C3.53472 21.2387 3.67446 18.9979 6.38043 16.206C9.08641 13.4147 10.6615 9.33111 10.6615 9.33111C10.6615 9.33111 11.2499 6.95933 12.59 7.17757C13.93 7.39581 14.9139 10.9401 12.1069 13.1084C9.29997 15.276 12.6659 16.7489 13.7459 14.713C14.8258 12.6772 17.7747 7.44316 19.304 6.44221C20.8326 5.44128 21.9089 6.00204 21.5484 8.06532C21.188 10.1286 14.795 15.1295 15.4171 16.2118C16.0391 17.2934 18.2312 14.9402 18.2312 14.9402C18.2312 14.9402 25.0907 8.49588 26.5842 10.1752C28.0776 11.8545 25.4512 13.2616 21.7082 15.6008C17.9646 17.9393 17.6744 18.557 18.2054 19.4418C18.7372 20.3266 26.9998 13.1351 27.7759 16.1838C28.5513 19.2324 19.3434 20.1173 19.9117 22.2219C20.48 24.3274 26.3979 18.2382 27.6082 20.6107C28.8193 22.9839 19.2574 25.7722 19.18 25.7929C16.0914 26.62 8.24723 28.3726 5.50686 24.2246Z" fill="#FFD21E"></path></svg>
167
+ Community
168
+
169
+
170
+
171
+ </a></div>
172
+
173
+
174
+
175
+
176
+ <div class="relative mb-1.5 flex flex-wrap gap-1.5 sm:flex-nowrap lg:mb-0"><div class="order-last sm:order-first"><div class="relative ">
177
+ <button class="btn px-1.5 py-1.5 " type="button">
178
+
179
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="p-0.5" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><circle cx="16" cy="7" r="3" fill="currentColor"></circle><circle cx="16" cy="16" r="3" fill="currentColor"></circle><circle cx="16" cy="25" r="3" fill="currentColor"></circle></svg>
180
+
181
+ </button>
182
+
183
+
184
+ </div></div>
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ </div>
206
+ </div></div></header>
207
+ </div>
208
+
209
+ <div class="container relative flex flex-col md:grid md:space-y-0 w-full md:grid-cols-12 space-y-4 md:gap-6 mb-16"><section class="pt-8 border-gray-100 col-span-full"><header class="flex flex-wrap items-center justify-start pb-2 md:justify-end lg:flex-nowrap"><div class="grow max-md:flex max-md:w-full max-md:items-start max-md:justify-between"><div class="relative mr-4 flex min-w-0 basis-auto flex-wrap items-center md:grow md:basis-full lg:basis-auto lg:flex-nowrap"><div class="SVELTE_HYDRATER contents" data-target="BranchSelector" data-props="{&quot;path&quot;:&quot;yoloCADex.pt&quot;,&quot;repoName&quot;:&quot;krockema/YoloCadExtract&quot;,&quot;repoType&quot;:&quot;model&quot;,&quot;rev&quot;:&quot;main&quot;,&quot;refs&quot;:{&quot;branches&quot;:[{&quot;name&quot;:&quot;main&quot;,&quot;ref&quot;:&quot;refs/heads/main&quot;,&quot;targetCommit&quot;:&quot;ffbd6c5ec9c104280d4227cf4c818dd18aee0a1c&quot;}],&quot;tags&quot;:[],&quot;converts&quot;:[]},&quot;view&quot;:&quot;blob&quot;}"><div class="relative mr-4 mb-2">
210
+ <button class="text-sm md:text-base btn w-full cursor-pointer text-sm" type="button">
211
+ <svg class="mr-1.5 text-gray-700 dark:text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="transform: rotate(360deg);"><path d="M13 14c-3.36 0-4.46 1.35-4.82 2.24C9.25 16.7 10 17.76 10 19a3 3 0 0 1-3 3a3 3 0 0 1-3-3c0-1.31.83-2.42 2-2.83V7.83A2.99 2.99 0 0 1 4 5a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.31-.83 2.42-2 2.83v5.29c.88-.65 2.16-1.12 4-1.12c2.67 0 3.56-1.34 3.85-2.23A3.006 3.006 0 0 1 14 7a3 3 0 0 1 3-3a3 3 0 0 1 3 3c0 1.34-.88 2.5-2.09 2.86C17.65 11.29 16.68 14 13 14m-6 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1M7 4a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1m10 2a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1z" fill="currentColor"></path></svg>
212
+ main
213
+ <svg class="-mr-1 text-gray-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></button>
214
+
215
+
216
+ </div></div>
217
+ <div class="relative mb-2 flex flex-wrap items-center"><a class="truncate text-gray-800 hover:underline" href="/krockema/YoloCadExtract/tree/main">YoloCadExtract</a>
218
+ <span class="mx-1 text-gray-300">/</span>
219
+ <span class="dark:text-gray-300">yoloCADex.pt</span>
220
+ <div class="SVELTE_HYDRATER contents" data-target="CopyButton" data-props="{&quot;value&quot;:&quot;yoloCADex.pt&quot;,&quot;classNames&quot;:&quot;text-xs ml-2&quot;,&quot;title&quot;:&quot;Copy path&quot;}"><button class="relative text-xs ml-2 focus:outline-hidden inline-flex cursor-pointer items-center text-sm mx-0.5 text-gray-600 " title="Copy path" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
221
+
222
+ </button></div></div></div>
223
+ </div>
224
+
225
+ </header>
226
+ <div class="SVELTE_HYDRATER contents" data-target="LastCommit" data-props="{&quot;commitLast&quot;:{&quot;date&quot;:&quot;2025-03-14T09:21:33.000Z&quot;,&quot;verified&quot;:&quot;verified&quot;,&quot;subject&quot;:&quot;Inital Commit&quot;,&quot;authors&quot;:[{&quot;_id&quot;:&quot;66217854acf8bd8a819de556&quot;,&quot;avatar&quot;:&quot;https://cdn-avatars.huggingface.co/v1/production/uploads/66217854acf8bd8a819de556/SX7TwS36ZTblEeMiScC2Q.jpeg&quot;,&quot;isHf&quot;:false,&quot;user&quot;:&quot;krockema&quot;}],&quot;commit&quot;:{&quot;id&quot;:&quot;ffbd6c5ec9c104280d4227cf4c818dd18aee0a1c&quot;,&quot;parentIds&quot;:[&quot;e11d6aa7e56078e15d363e2b7f904a73da317921&quot;]},&quot;title&quot;:&quot;Inital Commit&quot;},&quot;repo&quot;:{&quot;name&quot;:&quot;krockema/YoloCadExtract&quot;,&quot;type&quot;:&quot;model&quot;}}"><div class="from-gray-100-to-white bg-linear-to-t flex flex-wrap items-baseline rounded-t-lg border border-b-0 px-3 py-2 dark:border-gray-800"><img class="mr-2.5 mt-0.5 h-4 w-4 self-center rounded-full" alt="krockema's picture" src="https://cdn-avatars.huggingface.co/v1/production/uploads/66217854acf8bd8a819de556/SX7TwS36ZTblEeMiScC2Q.jpeg">
227
+ <div class="mr-4 flex flex-none items-center truncate"><a class="hover:underline" href="/krockema">krockema
228
+ </a>
229
+
230
+ </div>
231
+ <div class="mr-4 truncate font-mono text-sm text-gray-500 hover:prose-a:underline"><!-- HTML_TAG_START -->Inital Commit<!-- HTML_TAG_END --></div>
232
+ <a class="rounded-sm border bg-gray-50 px-1.5 text-sm hover:underline dark:border-gray-800 dark:bg-gray-900" href="/krockema/YoloCadExtract/commit/ffbd6c5ec9c104280d4227cf4c818dd18aee0a1c">ffbd6c5</a>
233
+ <span class="mx-2 text-green-500 dark:text-green-600 px-1.5 border-green-100 dark:border-green-800 rounded-full border text-xs uppercase" title="This commit is signed and the signature is verified">verified</span>
234
+ <time class="ml-auto hidden flex-none truncate pl-2 text-gray-500 dark:text-gray-400 lg:block" datetime="2025-03-14T09:21:33" title="Fri, 14 Mar 2025 09:21:33 GMT">1 day ago</time></div></div>
235
+ <div class="relative flex flex-wrap items-center border px-3 py-1.5 text-sm text-gray-800 dark:border-gray-800 dark:bg-gray-900 ">
236
+ <a class="my-1 mr-4 flex items-center hover:underline " download="" href="/krockema/YoloCadExtract/resolve/main/yoloCADex.pt?download=true"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 32 32"><path fill="currentColor" d="M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"></path></svg>
237
+ download
238
+ </a><div class="SVELTE_HYDRATER contents" data-target="CopyButton" data-props="{&quot;value&quot;:&quot;https://huggingface.co/krockema/YoloCadExtract/resolve/main/yoloCADex.pt&quot;,&quot;style&quot;:&quot;blank&quot;,&quot;label&quot;:&quot;Copy download link&quot;,&quot;classNames&quot;:&quot;my-1 mr-4 flex items-center no-underline hover:underline&quot;}"><button class="relative my-1 mr-4 flex items-center no-underline hover:underline " title="Copy download link" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg>
239
+ <span class="ml-1.5 ">Copy download link</span>
240
+ </button></div><a class="my-1 mr-4 flex items-center hover:underline " href="/krockema/YoloCadExtract/commits/main/yoloCADex.pt"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M16 4C9.383 4 4 9.383 4 16s5.383 12 12 12s12-5.383 12-12S22.617 4 16 4zm0 2c5.535 0 10 4.465 10 10s-4.465 10-10 10S6 21.535 6 16S10.465 6 16 6zm-1 2v9h7v-2h-5V8z" fill="currentColor"></path></svg>
241
+ history
242
+ </a><a class="my-1 mr-4 flex items-center hover:underline " href="/krockema/YoloCadExtract/blame/main/yoloCADex.pt"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2zm0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12z" fill="currentColor"></path><path d="M11.5 11a2.5 2.5 0 1 0 2.5 2.5a2.48 2.48 0 0 0-2.5-2.5z" fill="currentColor"></path><path d="M20.5 11a2.5 2.5 0 1 0 2.5 2.5a2.48 2.48 0 0 0-2.5-2.5z" fill="currentColor"></path></svg>
243
+ blame
244
+ </a><a class="my-1 mr-4 flex items-center hover:underline text-green-600 dark:text-gray-300" href="/krockema/YoloCadExtract/edit/main/yoloCADex.pt"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M2 26h28v2H2z" fill="currentColor"></path><path d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z" fill="currentColor"></path></svg>
245
+ contribute
246
+ </a><a class="my-1 mr-4 flex items-center hover:underline " href="/krockema/YoloCadExtract/delete/main/yoloCADex.pt"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M12 12h2v12h-2z" fill="currentColor"></path><path d="M18 12h2v12h-2z" fill="currentColor"></path><path d="M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z" fill="currentColor"></path><path d="M12 2h8v2h-8z" fill="currentColor"></path></svg>
247
+ delete
248
+ </a>
249
+
250
+ <div class="mr-4 flex items-center"><div class="SVELTE_HYDRATER contents" data-target="ScanStatusBadge" data-props="{&quot;classNames&quot;:&quot;mr-2&quot;,&quot;scanStatus&quot;:{&quot;status&quot;:&quot;caution&quot;,&quot;protectAiScan&quot;:{&quot;status&quot;:&quot;safe&quot;,&quot;message&quot;:&quot;This file has no security findings.&quot;,&quot;reportLink&quot;:&quot;https://protectai.com/insights/models/krockema/YoloCadExtract/ffbd6c5ec9c104280d4227cf4c818dd18aee0a1c/files?blob-id=4b954fdde6c7c25d49541f1f31f70941502744dd&amp;utm_source=huggingface&quot;},&quot;avScan&quot;:{&quot;status&quot;:&quot;safe&quot;},&quot;pickleImportScan&quot;:{&quot;status&quot;:&quot;caution&quot;,&quot;pickleImports&quot;:[{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;HalfStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch.nn.modules.conv&quot;,&quot;name&quot;:&quot;Conv2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch._utils&quot;,&quot;name&quot;:&quot;_rebuild_tensor_v2&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepCSP&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;Concat&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;device&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;RepConv&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepNCSPELAN4&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;FloatStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch.nn.modules.loss&quot;,&quot;name&quot;:&quot;BCEWithLogitsLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.linear&quot;,&quot;name&quot;:&quot;Identity&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;SPPELAN&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.tasks&quot;,&quot;name&quot;:&quot;DetectionModel&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.pooling&quot;,&quot;name&quot;:&quot;MaxPool2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils&quot;,&quot;name&quot;:&quot;IterableSimpleNamespace&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;LongStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;__builtin__&quot;,&quot;name&quot;:&quot;set&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.container&quot;,&quot;name&quot;:&quot;Sequential&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.activation&quot;,&quot;name&quot;:&quot;SiLU&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;DFL&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;ADown&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.loss&quot;,&quot;name&quot;:&quot;v8DetectionLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.tal&quot;,&quot;name&quot;:&quot;TaskAlignedAssigner&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.batchnorm&quot;,&quot;name&quot;:&quot;BatchNorm2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepBottleneck&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;collections&quot;,&quot;name&quot;:&quot;OrderedDict&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch._utils&quot;,&quot;name&quot;:&quot;_rebuild_parameter&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.upsampling&quot;,&quot;name&quot;:&quot;Upsample&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.loss&quot;,&quot;name&quot;:&quot;BboxLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.head&quot;,&quot;name&quot;:&quot;Detect&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;Conv&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.container&quot;,&quot;name&quot;:&quot;ModuleList&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;Size&quot;,&quot;safety&quot;:&quot;suspicious&quot;}],&quot;message&quot;:&quot;This file contains imports that require your attention. Click on the pickle button to get more detail.&quot;},&quot;jFrogScan&quot;:{&quot;status&quot;:&quot;queued&quot;,&quot;message&quot;:&quot;&quot;,&quot;reportLink&quot;:&quot;&quot;,&quot;reportLabel&quot;:&quot;&quot;}},&quot;repo&quot;:{&quot;_id&quot;:&quot;67d3e86523985ab1a804e38e&quot;,&quot;gitalyUid&quot;:&quot;f98dd51317ded8df5e1036dcfdde036a3b1fdbb8075069e4a40211a0f01801d5&quot;,&quot;type&quot;:&quot;model&quot;,&quot;name&quot;:&quot;krockema/YoloCadExtract&quot;,&quot;config&quot;:{&quot;private&quot;:false,&quot;gated&quot;:false,&quot;discussionsDisabled&quot;:false,&quot;duplicationDisabled&quot;:false,&quot;region&quot;:&quot;us&quot;,&quot;gitaly&quot;:{&quot;storage&quot;:&quot;default&quot;,&quot;repoUid&quot;:&quot;f98dd51317ded8df5e1036dcfdde036a3b1fdbb8075069e4a40211a0f01801d5&quot;,&quot;region&quot;:&quot;us&quot;},&quot;lfs&quot;:{&quot;bucket&quot;:&quot;hf-hub-lfs-us-east-1&quot;,&quot;prefix&quot;:&quot;repos/f9/8d/f98dd51317ded8df5e1036dcfdde036a3b1fdbb8075069e4a40211a0f01801d5&quot;,&quot;usedStorage&quot;:51688379},&quot;xet&quot;:{&quot;enabled&quot;:false,&quot;bucket&quot;:&quot;xet-bridge-us&quot;,&quot;service&quot;:&quot;cas&quot;}},&quot;updatedAt&quot;:&quot;2025-03-14T08:27:17.089Z&quot;,&quot;authorId&quot;:&quot;66217854acf8bd8a819de556&quot;,&quot;creatorId&quot;:&quot;66217854acf8bd8a819de556&quot;},&quot;revision&quot;:&quot;main&quot;,&quot;filePath&quot;:&quot;yoloCADex.pt&quot;,&quot;openByDefault&quot;:false}"><div class="sm:relative mr-2"><button class="flex h-[1.125rem] select-none items-center gap-0.5 rounded border pl-0.5 pr-0.5 text-xs leading-tight text-gray-400 hover:cursor-pointer text-gray-400 hover:border-gray-200 hover:bg-gray-50 hover:text-gray-500 dark:border-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200 "><svg class="flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 15 19" fill="none"><path d="M6.59065 6.00619C6.5907 5.47868 7.01834 5.05107 7.54585 5.05107C8.07343 5.05107 8.5011 5.47878 8.50106 6.00636L8.50082 8.61621C8.50077 9.14372 8.07313 9.57132 7.54562 9.57132C7.01804 9.57132 6.59037 9.14361 6.59042 8.61604L6.59065 6.00619Z" fill="currentColor"></path><path d="M7.54553 12.2291C8.07308 12.2291 8.50074 11.8014 8.50074 11.2739C8.50074 10.7464 8.07308 10.3187 7.54553 10.3187C7.01799 10.3187 6.59033 10.7464 6.59033 11.2739C6.59033 11.8014 7.01799 12.2291 7.54553 12.2291Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.54555 18.3103C3.67169 17.067 0.338379 12.9769 0.338379 8.62558V4.39134C0.338379 3.63458 0.806849 2.96791 1.50955 2.69764L6.91496 0.67061C7.32035 0.517456 7.77082 0.517456 8.17623 0.679618L13.5816 2.70665C13.9251 2.83497 14.2212 3.06499 14.4304 3.36601C14.6397 3.66703 14.7522 4.02472 14.7528 4.39134V8.62558C14.7528 12.9859 11.4195 17.067 7.54555 18.3103Z" fill="currentColor" fill-opacity="0.1"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.17623 0.679618C7.77082 0.517456 7.32035 0.517456 6.91496 0.67061L1.50955 2.69764C0.806849 2.96791 0.338379 3.63458 0.338379 4.39134V8.62558C0.338379 12.9769 3.67169 17.067 7.54555 18.3103C11.4195 17.067 14.7528 12.9859 14.7528 8.62558V4.39134C14.7522 4.02472 14.6397 3.66703 14.4304 3.36601C14.2212 3.06499 13.9251 2.83497 13.5816 2.70665L8.17623 0.679618ZM13.4014 4.39278C13.4011 4.30145 13.373 4.21237 13.3209 4.13737C13.2685 4.06211 13.1945 4.00461 13.1087 3.97253L13.1072 3.97196L7.68799 1.93977L7.67434 1.93432C7.59062 1.90082 7.48974 1.89804 7.39251 1.93476L7.38947 1.93592L1.991 3.96035C1.8015 4.03486 1.68973 4.2065 1.68973 4.39134V8.62558C1.68973 12.1863 4.35996 15.6469 7.54562 16.8776C10.7318 15.6473 13.4014 12.1943 13.4014 8.62558V4.39278Z" fill="currentColor" fill-opacity="0.2"></path></svg></button>
251
+
252
+ </div></div>
253
+ <div class="SVELTE_HYDRATER contents" data-target="Pickle" data-props="{&quot;status&quot;:&quot;caution&quot;,&quot;imports&quot;:[{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;HalfStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch.nn.modules.conv&quot;,&quot;name&quot;:&quot;Conv2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch._utils&quot;,&quot;name&quot;:&quot;_rebuild_tensor_v2&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepCSP&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;Concat&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;device&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;RepConv&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepNCSPELAN4&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;FloatStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch.nn.modules.loss&quot;,&quot;name&quot;:&quot;BCEWithLogitsLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.linear&quot;,&quot;name&quot;:&quot;Identity&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;SPPELAN&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.tasks&quot;,&quot;name&quot;:&quot;DetectionModel&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.pooling&quot;,&quot;name&quot;:&quot;MaxPool2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils&quot;,&quot;name&quot;:&quot;IterableSimpleNamespace&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;LongStorage&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;__builtin__&quot;,&quot;name&quot;:&quot;set&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.container&quot;,&quot;name&quot;:&quot;Sequential&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.activation&quot;,&quot;name&quot;:&quot;SiLU&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;DFL&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;ADown&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.loss&quot;,&quot;name&quot;:&quot;v8DetectionLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.tal&quot;,&quot;name&quot;:&quot;TaskAlignedAssigner&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.batchnorm&quot;,&quot;name&quot;:&quot;BatchNorm2d&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.block&quot;,&quot;name&quot;:&quot;RepBottleneck&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;collections&quot;,&quot;name&quot;:&quot;OrderedDict&quot;,&quot;safety&quot;:&quot;innocuous&quot;},{&quot;module&quot;:&quot;torch._utils&quot;,&quot;name&quot;:&quot;_rebuild_parameter&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.upsampling&quot;,&quot;name&quot;:&quot;Upsample&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.utils.loss&quot;,&quot;name&quot;:&quot;BboxLoss&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.head&quot;,&quot;name&quot;:&quot;Detect&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;ultralytics.nn.modules.conv&quot;,&quot;name&quot;:&quot;Conv&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch.nn.modules.container&quot;,&quot;name&quot;:&quot;ModuleList&quot;,&quot;safety&quot;:&quot;suspicious&quot;},{&quot;module&quot;:&quot;torch&quot;,&quot;name&quot;:&quot;Size&quot;,&quot;safety&quot;:&quot;suspicious&quot;}]}">
254
+
255
+ <div class="sm:relative ">
256
+ <span class="peer" tabindex="0"><button title="Pickle imports detected" class="flex select-none items-center rounded-md border px-1 py-1 text-xs text-gray-400 hover:cursor-pointer hover:bg-gray-50 hover:text-gray-500 dark:border-gray-700 dark:hover:bg-gray-950 lg:py-0 "><svg class="text-[0.65rem] lg:mr-1 text-orange-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 11 13" preserveAspectRatio="xMidYMid meet" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.5C3 3.67157 2.32843 3 1.5 3C0.671573 3 0 3.67157 0 4.5V11.5C0 12.3284 0.671573 13 1.5 13C2.32843 13 3 12.3284 3 11.5V4.5ZM7 4.5C7 3.67157 6.32843 3 5.5 3C4.67157 3 4 3.67157 4 4.5V11.5C4 12.3284 4.67157 13 5.5 13C6.32843 13 7 12.3284 7 11.5V4.5ZM9.5 3C10.3284 3 11 3.67157 11 4.5V7.5C11 8.32843 10.3284 9 9.5 9C8.67157 9 8 8.32843 8 7.5V4.5C8 3.67157 8.67157 3 9.5 3ZM11 11C11 10.1716 10.3284 9.5 9.5 9.5C8.67157 9.5 8 10.1716 8 11V11.5C8 12.3284 8.67157 13 9.5 13C10.3284 13 11 12.3284 11 11.5V11Z" fill="currentColor"></path><path d="M0 0.5C0 0.223858 0.223858 0 0.5 0H10.5C10.7761 0 11 0.223858 11 0.5V0.5C11 1.60457 10.1046 2.5 9 2.5H2C0.895431 2.5 0 1.60457 0 0.5V0.5Z" class="fill-current text-gray-300 dark:text-gray-400"></path></svg>
257
+ <div class="hidden lg:block">pickle</div></button></span>
258
+ <div role="tooltip" class="absolute left-5 right-5 z-40 mt-2 hidden max-h-96 max-w-full overflow-y-auto rounded-xl border px-4 pb-4 pt-3 text-base focus-within:block hover:block peer-focus-within:block sm:mt-0 sm:w-80 sm:max-w-none text-orange-500 border-orange-100 bg-linear-to-br from-orange-50 to-white dark:from-orange-500/10 dark:to-gray-900 dark:bg-gray-900 sm:left-0 sm:right-auto sm:top-6"><div class="mb-3 flex items-center"><h4 class="text-smd grow font-semibold">Detected Pickle imports (33)</h4>
259
+ <button class="grow-0 opacity-60 hover:opacity-100"><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1.1em" height="1.1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z" fill="currentColor"></path></svg></button></div>
260
+
261
+ <ul class="mb-4 font-mono text-xs text-gray-600 dark:text-gray-300"><li><span>&quot;torch.HalfStorage&quot;</span>,
262
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.conv.Conv2d&quot;</span>,
263
+ </li><li><span>&quot;torch._utils._rebuild_tensor_v2&quot;</span>,
264
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.RepCSP&quot;</span>,
265
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.conv.Concat&quot;</span>,
266
+ </li><li><span class="text-orange-500">&quot;torch.device&quot;</span>,
267
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.conv.RepConv&quot;</span>,
268
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.RepNCSPELAN4&quot;</span>,
269
+ </li><li><span>&quot;torch.FloatStorage&quot;</span>,
270
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.loss.BCEWithLogitsLoss&quot;</span>,
271
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.linear.Identity&quot;</span>,
272
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.SPPELAN&quot;</span>,
273
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.tasks.DetectionModel&quot;</span>,
274
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.pooling.MaxPool2d&quot;</span>,
275
+ </li><li><span class="text-orange-500">&quot;ultralytics.utils.IterableSimpleNamespace&quot;</span>,
276
+ </li><li><span>&quot;torch.LongStorage&quot;</span>,
277
+ </li><li><span class="text-orange-500">&quot;__builtin__.set&quot;</span>,
278
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.container.Sequential&quot;</span>,
279
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.activation.SiLU&quot;</span>,
280
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.DFL&quot;</span>,
281
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.ADown&quot;</span>,
282
+ </li><li><span class="text-orange-500">&quot;ultralytics.utils.loss.v8DetectionLoss&quot;</span>,
283
+ </li><li><span class="text-orange-500">&quot;ultralytics.utils.tal.TaskAlignedAssigner&quot;</span>,
284
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.batchnorm.BatchNorm2d&quot;</span>,
285
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.block.RepBottleneck&quot;</span>,
286
+ </li><li><span>&quot;collections.OrderedDict&quot;</span>,
287
+ </li><li><span class="text-orange-500">&quot;torch._utils._rebuild_parameter&quot;</span>,
288
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.upsampling.Upsample&quot;</span>,
289
+ </li><li><span class="text-orange-500">&quot;ultralytics.utils.loss.BboxLoss&quot;</span>,
290
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.head.Detect&quot;</span>,
291
+ </li><li><span class="text-orange-500">&quot;ultralytics.nn.modules.conv.Conv&quot;</span>,
292
+ </li><li><span class="text-orange-500">&quot;torch.nn.modules.container.ModuleList&quot;</span>,
293
+ </li><li><span class="text-orange-500">&quot;torch.Size&quot;</span>
294
+ </li></ul>
295
+ <p class="text-sm text-gray-700 dark:text-gray-300"><a class="flex cursor-pointer items-center underline" href="/docs/hub/security-pickle" target="_blank"><svg class="mr-1.5 text-gray-300 dark:text-gray-600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" fill="currentColor"><path d="M8.892 21.854a6.25 6.25 0 0 1-4.42-10.67l7.955-7.955a4.5 4.5 0 0 1 6.364 6.364l-6.895 6.894a2.816 2.816 0 0 1-3.89 0a2.75 2.75 0 0 1 .002-3.888l5.126-5.127a1 1 0 1 1 1.414 1.414l-5.126 5.127a.75.75 0 0 0 0 1.06a.768.768 0 0 0 1.06 0l6.895-6.894a2.503 2.503 0 0 0 0-3.535a2.56 2.56 0 0 0-3.536 0l-7.955 7.955a4.25 4.25 0 1 0 6.01 6.01l6.188-6.187a1 1 0 1 1 1.414 1.414l-6.187 6.186a6.206 6.206 0 0 1-4.42 1.832z"></path></svg>
296
+ How to fix it?</a></p></div></div></div></div>
297
+
298
+ <div class="flex items-center gap-x-3 dark:text-gray-300 sm:ml-auto"><div class="SVELTE_HYDRATER contents" data-target="LineWrapButton" data-props="{&quot;classNames&quot;:&quot;text-xs&quot;,&quot;lineSelectorClass&quot;:&quot;blob-line&quot;}">
299
+
300
+ <button class="text-xs" type="button" title="Toggle Line Wrap"><svg class="opacity-50" width="1em" height="1em" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.75 1.25H11.25M0.75 5H9C9.75 5 11.25 5.375 11.25 6.875C11.25 8.375 9.99975 8.75 9.375 8.75H6M6 8.75L7.5 7.25M6 8.75L7.5 10.25M0.75 8.75H3.75" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round"></path></svg></button></div>
301
+ 51.7 MB</div></div>
302
+
303
+ <div class="relative min-h-[100px] rounded-b-lg border border-t-0 leading-tight dark:border-gray-800 dark:bg-gray-925">
304
+ <div class="p-4 py-8 text-center">This file is stored with
305
+ <a class="underline" href="https://git-lfs.github.com/">Git LFS</a>
306
+ . It is too big to display, but you can still
307
+ <a download class="underline" href="/krockema/YoloCadExtract/resolve/main/yoloCADex.pt">download</a>
308
+ it.
309
+ </div>
310
+ <div class="border-t p-4"><h3 class="mb-2 font-semibold leading-relaxed">Git LFS Details</h3>
311
+ <ul class="break-words font-mono text-sm"><li><strong>SHA256:</strong>
312
+ 90613d54a108ee9240a15add2e4432469b2026017f12aac14f49908a26a9bb7b</li>
313
+ <li><strong>Pointer size:</strong>
314
+ 133 Bytes</li>
315
+ <li><strong>Size of remote file:</strong>
316
+ 51.7 MB</li>
317
+ </ul>
318
+ <div class="mb-3 mt-2.5"><a class="flex items-center underline" href="/krockema/YoloCadExtract/raw/main/yoloCADex.pt" target="_blank"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M25.7 9.3l-7-7A.908.908 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h16a2.006 2.006 0 0 0 2-2V10a.908.908 0 0 0-.3-.7zM18 4.4l5.6 5.6H18zM24 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6z" fill="currentColor"></path></svg>
319
+ Raw pointer file
320
+ </a></div>
321
+ <p class="text-sm text-gray-500">Git Large File Storage (LFS) replaces large files with text pointers inside Git, while storing the file
322
+ contents on a remote server.
323
+ <a class="underline" href="https://git-lfs.github.com/" target="_blank">More info</a>.
324
+ </p></div></div></section></div></main>
325
+
326
+ </div>
327
+
328
+ <script>
329
+ import("\/front\/build\/kube-a3d300f\/index.js");
330
+ window.moonSha = "kube-a3d300f\/";
331
+ window.__hf_deferred = {};
332
+ </script>
333
+
334
+ <!-- Stripe -->
335
+ <script>
336
+ if (["hf.co", "huggingface.co"].includes(window.location.hostname)) {
337
+ const script = document.createElement("script");
338
+ script.src = "https://js.stripe.com/v3/";
339
+ script.async = true;
340
+ document.head.appendChild(script);
341
+ }
342
+ </script>
343
+ </body>
344
+ </html>