visiongauge 0.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: visiongauge
3
+ Version: 0.0.7
4
+ Summary: A computer vision model to detect and read u-tube manometers.
5
+ Author: Clayton Silva dos Santos, Marcos Noboru Arima
6
+ Author-email: Clayton Silva dos Santos <santoscsdos@gmail.com>, Marcos Noboru Arima <mnoboru@n-thermo.com.br>
7
+ Maintainer: Clayton Silva dos Santos
8
+ Maintainer-email: Clayton Silva dos Santos <santoscsdos@gmail.com>
9
+ Requires-Python: >=3.12,<3.15
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: torch>=2.9.0
13
+ Requires-Dist: torchvision>=0.24.0
14
+ Requires-Dist: ultralytics>=8.4.14
15
+ Requires-Dist: huggingface_hub>=1.4.0
16
+ Requires-Dist: albumentations>=2.0.8
17
+ Requires-Dist: tqdm>=4.67.3
18
+ Requires-Dist: opencv-python>=4.13.0
19
+ Dynamic: author
20
+ Dynamic: license-file
21
+ Dynamic: maintainer
22
+ Dynamic: requires-python
23
+
24
+ # VisionGauge
@@ -0,0 +1 @@
1
+ # VisionGauge
@@ -0,0 +1,2 @@
1
+ from .models import VisionGauge
2
+ from .dataset import ImageDataset
@@ -0,0 +1,44 @@
1
+ from torch.utils.data import Dataset
2
+ import torch
3
+ import cv2
4
+
5
+ class ImageDataset(Dataset):
6
+ """
7
+ Dataset class that supports both:
8
+ 1. List of image file paths
9
+ 2. Tensor of images with shape (batch, C, H, W)
10
+
11
+ Args:
12
+ images (list or torch.Tensor): List of paths or tensor (batch, C, H, W)
13
+ """
14
+
15
+ def __init__(self, images):
16
+ if isinstance(images, list) and all(isinstance(i, str) for i in images):
17
+ # Case 1: list of file paths
18
+ self.mode = "paths"
19
+ self.images = images
20
+ elif isinstance(images, torch.Tensor):
21
+ # Case 2: preloaded tensor
22
+ if images.ndim != 4:
23
+ raise ValueError(f"Expected tensor of shape (batch, C, H, W), got {images.shape}")
24
+ self.mode = "tensor"
25
+ self.images = images
26
+ else:
27
+ raise ValueError("Input must be a list of paths or a torch tensor (batch, C, H, W)")
28
+
29
+ def __len__(self):
30
+ return len(self.images)
31
+
32
+ def __getitem__(self, idx):
33
+ if self.mode == "paths":
34
+ # Load image from file path
35
+ img = cv2.imread(self.images[idx])
36
+ if img is None:
37
+ raise ValueError(f"Could not read image at path: {self.images[idx]}")
38
+ img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
39
+ # Convert to tensor (H, W, C) -> (C, H, W)
40
+ img_tensor = torch.from_numpy(img).permute(2, 0, 1).float()
41
+ return img_tensor
42
+ else:
43
+ # Already a tensor (C, H, W)
44
+ return self.images[idx]
@@ -0,0 +1,251 @@
1
+
2
+ # %%
3
+ from matplotlib import image
4
+ import torch
5
+ import torch.nn as nn
6
+ from torchvision import models
7
+ from ultralytics import YOLO
8
+ from huggingface_hub import hf_hub_download
9
+ import albumentations as A
10
+ from albumentations.pytorch import ToTensorV2
11
+ from tqdm import tqdm
12
+
13
+ class Regressor(nn.Module):
14
+ def __init__(self, image_size: tuple = (120, 120)):
15
+ super().__init__()
16
+ self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
17
+ self.image_size = image_size
18
+
19
+ # Baixar modelo do HuggingFace
20
+ model_path = hf_hub_download(
21
+ repo_id="claytonsds/VisionGauge",
22
+ filename="regressor.pth"
23
+ )
24
+
25
+ model_state = torch.load(model_path, map_location="cpu")
26
+
27
+ # Backbone ResNet18
28
+ self.backbone = models.resnet18(weights=None)
29
+ out_feats = self.backbone.fc.in_features
30
+ self.backbone.fc = nn.Linear(out_feats, 1)
31
+
32
+ # Adjust keys from state_dict by removing "backbone."
33
+ new_state_dict = {}
34
+ for k, v in model_state.items():
35
+ if k.startswith("backbone."):
36
+ new_state_dict[k.replace("backbone.", "")] = v
37
+ else:
38
+ new_state_dict[k] = v
39
+
40
+ # Carregar pesos
41
+ self.backbone.load_state_dict(new_state_dict, strict=True)
42
+
43
+ # Colocar em modo inferência
44
+ self.backbone.eval()
45
+ self.to(self.device)
46
+
47
+ def forward(self, x):
48
+ x = x.to(self.device)
49
+ return self.backbone(x)
50
+
51
+
52
+
53
+ class Detector:
54
+ def __init__(self):
55
+ model_state = hf_hub_download(repo_id="claytonsds/VisionGauge", filename="detector.pt")
56
+ self.model = YOLO(model_state)
57
+
58
+ def predict(self, img):
59
+ results = self.model.predict(img, verbose=False)
60
+ return results
61
+
62
+
63
+ class VisionGauge:
64
+ """
65
+ VisionGauge is a computer vision model to detect and read u-tube manometers.
66
+
67
+ Attributes:
68
+ detector (Detector): Object detection model.
69
+ regressor (Regressor): Regression model applied to crops.
70
+ """
71
+
72
+ def __init__(self):
73
+ self.detector = Detector()
74
+ self.regressor = Regressor()
75
+
76
+ def add_Transformation(self, image, min_size=120):
77
+ """
78
+ Apply preprocessing transformations to an image crop.
79
+
80
+ Args:
81
+ image (numpy.ndarray): Image to be transformed.
82
+ min_size (int): Minimum size for padding and resizing.
83
+
84
+ Returns:
85
+ torch.Tensor: Transformed image tensor with shape (C, H, W).
86
+ """
87
+ transform = A.Compose([
88
+ A.PadIfNeeded(min_height=min_size, min_width=min_size, border_mode=0),
89
+ A.Resize(120, 120),
90
+ A.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
91
+ ToTensorV2(),
92
+ ])
93
+
94
+ return transform(image=image)["image"]
95
+
96
+ def get_crops(self, tensor, x1, x2, y1, y2):
97
+ """
98
+ Crop a region from a tensor using bounding box coordinates.
99
+
100
+ Args:
101
+ tensor (torch.Tensor): Image tensor with shape (C, H, W).
102
+ x1, x2, y1, y2 (int): Bounding box coordinates.
103
+
104
+ Returns:
105
+ torch.Tensor: Cropped tensor with shape (C, y2-y1, x2-x1).
106
+ """
107
+ return tensor[:, y1:y2, x1:x2]
108
+
109
+ def predict_bounding_boxes(self, img):
110
+ """
111
+ Run the detector on a single image and return bounding boxes.
112
+
113
+ Args:
114
+ img (numpy.ndarray): Input image in HWC format.
115
+
116
+ Returns:
117
+ numpy.ndarray: Bounding boxes array of shape (num_boxes, 4)
118
+ with coordinates [x1, y1, x2, y2].
119
+ """
120
+ results = self.detector.predict(img)
121
+ boxes = results[0].boxes.xyxy.cpu().numpy()
122
+ return boxes
123
+
124
+ def get_bounding_boxes(self, X):
125
+ """
126
+ Detect bounding boxes for a batch of images and pad to match shapes.
127
+
128
+ Args:
129
+ X (torch.Tensor): Batch of images with shape (batch, C, H, W).
130
+
131
+ Returns:
132
+ torch.Tensor: Padded bounding boxes with shape (batch, max_boxes, 4),
133
+ where max_boxes is the max number of boxes detected in the batch.
134
+
135
+ Note:
136
+ For images in the batch that have fewer boxes than max_boxes,
137
+ the remaining boxes are filled with zeros. This ensures that the
138
+ returned tensor has a uniform shape across the batch.
139
+ """
140
+ batch = X.shape[0]
141
+ raw_boxes = []
142
+
143
+ for i in range(batch):
144
+ # Convert tensor to numpy image (C, H, W) -> (H, W, C)
145
+ img_np = (X[i].permute(1, 2, 0).cpu().numpy())
146
+
147
+ # Predict bounding boxes for the image
148
+ boxes = self.predict_bounding_boxes(img_np) # shape (num_boxes, 4)
149
+ raw_boxes.append(boxes)
150
+
151
+ # Find the maximum number of boxes in the batch
152
+ max_boxes = max(b.shape[0] for b in raw_boxes)
153
+
154
+ # Pad boxes so all images have the same number of boxes (num_boxes -> max_boxes)
155
+ padded_boxes = []
156
+ for boxes in raw_boxes:
157
+ pad_size = max_boxes - boxes.shape[0]
158
+ if pad_size > 0:
159
+ # Fill the "missing" boxes with zeros
160
+ padding = np.full((pad_size, 4), 0) # dummy boxes filled with zeros
161
+ boxes = np.vstack([boxes, padding])
162
+ padded_boxes.append(boxes)
163
+
164
+ padded_boxes = torch.tensor(padded_boxes, dtype=torch.float32) # (batch, max_boxes, 4)
165
+ return padded_boxes
166
+
167
+ def not_all_equal2zero(self, *args):
168
+ """
169
+ Check if all provided values are not zero.
170
+
171
+ Args:
172
+ *args: Numbers to check.
173
+
174
+ Returns:
175
+ bool: True if at least one value is non-zero, False otherwise.
176
+ """
177
+ for arg in args:
178
+ if arg != 0:
179
+ return True
180
+ return False
181
+
182
+ def predict(self, X):
183
+ """
184
+ Predict properties for each detected bounding box in a batch of images.
185
+
186
+ Steps:
187
+ 1. Get bounding boxes for the batch (batch, C, H, W) -> (batch, max_boxes, 4)
188
+ 2. Crop each detected box from the image
189
+ 3. Apply transformations to each crop (padding and resizing)
190
+ 4. Run the regressor on the transformed crops
191
+ 5. Return predictions and boxes
192
+
193
+ Args:
194
+ X (torch.Tensor or DataLoader): Batch tensor (B, C, H, W) or DataLoader.
195
+
196
+ Note:
197
+ For boxes that were not detected in an image (dummy boxes with coordinates all zero),
198
+ the corresponding crop is filled with zeros and the prediction is set to 0.
199
+ This ensures that the predictions tensor has uniform shape (batch, max_boxes, 1)
200
+ across the batch.
201
+
202
+
203
+ Returns:
204
+ tuple:
205
+ - torch.Tensor: Bounding boxes (batch, max_boxes, 4)
206
+ - torch.Tensor: Predictions (batch, max_boxes, 1)
207
+ """
208
+ all_boxes = []
209
+ all_predictions = []
210
+
211
+ # Check if X is a DataLoader or iterable
212
+ if isinstance(X, torch.utils.data.DataLoader):
213
+ iterator = X
214
+ else:
215
+ # Wrap single tensor in a list to unify processing
216
+ iterator = [X]
217
+
218
+ # Iterate over batches
219
+ for batch in tqdm(iterator, desc="Processing batches"):
220
+ batches, channels, height, width = batch.shape # (B, C, H, W)
221
+ boxes = self.get_bounding_boxes(batch) # (B, max_boxes, 4)
222
+ _, max_boxes, _ = boxes.shape
223
+ Y_Tensor = torch.zeros(batches, max_boxes, 1)
224
+
225
+ for b in range(batches):
226
+ for i, box in enumerate(boxes[b]):
227
+ x1, y1, x2, y2 = box.int().tolist()
228
+
229
+ if self.not_all_equal2zero(x1, y1, x2, y2):
230
+ predicted_image = self.get_crops(batch[b], x1, x2, y1, y2)
231
+ h_pred, w_pred = predicted_image.shape[1], predicted_image.shape[2]
232
+ predicted_image = predicted_image.permute(1,2,0).cpu().numpy()
233
+ max_size = max(h_pred, w_pred)
234
+ predicted_image = self.add_Transformation(predicted_image, min_size=max_size).unsqueeze(0)
235
+
236
+ with torch.no_grad():
237
+ output = self.regressor(predicted_image).squeeze(1)
238
+
239
+ Y_Tensor[b, i] = output
240
+ else:
241
+ Y_Tensor[b, i] = 0 # dummy box
242
+
243
+ all_boxes.append(boxes)
244
+ all_predictions.append(Y_Tensor)
245
+
246
+ # Concatenate all batches
247
+ all_boxes = torch.cat(all_boxes, dim=0)
248
+ all_predictions = torch.cat(all_predictions, dim=0)
249
+
250
+ return all_boxes, all_predictions
251
+
@@ -0,0 +1,31 @@
1
+ [project]
2
+ name = "visiongauge"
3
+ version = "0.0.7"
4
+ description = "A computer vision model to detect and read u-tube manometers."
5
+ readme = { file = "README.md", content-type = "text/markdown" }
6
+ requires-python = ">=3.12,<3.15"
7
+ dependencies = [
8
+ "torch>=2.9.0",
9
+ "torchvision>=0.24.0",
10
+ "ultralytics>=8.4.14",
11
+ "huggingface_hub>=1.4.0",
12
+ "albumentations>=2.0.8",
13
+ "tqdm>=4.67.3",
14
+ "opencv-python>=4.13.0"
15
+ ]
16
+ authors = [
17
+ {name = "Clayton Silva dos Santos", email = "santoscsdos@gmail.com"},
18
+ {name = "Marcos Noboru Arima", email = "mnoboru@n-thermo.com.br"}
19
+ ]
20
+ maintainers = [
21
+ {name = "Clayton Silva dos Santos", email = "santoscsdos@gmail.com"}
22
+ ]
23
+
24
+ [tool.poetry]
25
+ packages = [
26
+ { include = "VisionGauge", from = "." }
27
+ ]
28
+
29
+ [build-system]
30
+ requires = ["setuptools >= 77.0.3"]
31
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,28 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="visiongauge",
5
+ version="0.0.1",
6
+ description="A computer vision model to detect and read u-tube manometers.",
7
+ long_description=open("README.md", "r", encoding="utf-8").read(),
8
+ long_description_content_type="text/markdown",
9
+ python_requires=">=3.12,<3.15",
10
+ packages=find_packages(where="."), # procura na raiz
11
+ install_requires=[
12
+ "torch>=2.9.0",
13
+ "torchvision>=0.24.0",
14
+ "ultralytics>=8.4.14",
15
+ "huggingface_hub>=1.4.0",
16
+ "albumentations>=2.0.8",
17
+ "tqdm>=4.67.3",
18
+ "opencv-python>=4.13.0"
19
+ ],
20
+ author="Clayton Silva dos Santos, Marcos Noboru Arima",
21
+ author_email="santoscsdos@gmail.com, mnoboru@n-thermo.com.br",
22
+ maintainer="Clayton Silva dos Santos",
23
+ maintainer_email="santoscsdos@gmail.com",
24
+ classifiers=[
25
+ "Programming Language :: Python :: 3",
26
+ "Operating System :: OS Independent",
27
+ ],
28
+ )
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: visiongauge
3
+ Version: 0.0.7
4
+ Summary: A computer vision model to detect and read u-tube manometers.
5
+ Author: Clayton Silva dos Santos, Marcos Noboru Arima
6
+ Author-email: Clayton Silva dos Santos <santoscsdos@gmail.com>, Marcos Noboru Arima <mnoboru@n-thermo.com.br>
7
+ Maintainer: Clayton Silva dos Santos
8
+ Maintainer-email: Clayton Silva dos Santos <santoscsdos@gmail.com>
9
+ Requires-Python: >=3.12,<3.15
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: torch>=2.9.0
13
+ Requires-Dist: torchvision>=0.24.0
14
+ Requires-Dist: ultralytics>=8.4.14
15
+ Requires-Dist: huggingface_hub>=1.4.0
16
+ Requires-Dist: albumentations>=2.0.8
17
+ Requires-Dist: tqdm>=4.67.3
18
+ Requires-Dist: opencv-python>=4.13.0
19
+ Dynamic: author
20
+ Dynamic: license-file
21
+ Dynamic: maintainer
22
+ Dynamic: requires-python
23
+
24
+ # VisionGauge
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ VisionGauge/__init__.py
6
+ VisionGauge/dataset.py
7
+ VisionGauge/models.py
8
+ visiongauge.egg-info/PKG-INFO
9
+ visiongauge.egg-info/SOURCES.txt
10
+ visiongauge.egg-info/dependency_links.txt
11
+ visiongauge.egg-info/requires.txt
12
+ visiongauge.egg-info/top_level.txt
@@ -0,0 +1,7 @@
1
+ torch>=2.9.0
2
+ torchvision>=0.24.0
3
+ ultralytics>=8.4.14
4
+ huggingface_hub>=1.4.0
5
+ albumentations>=2.0.8
6
+ tqdm>=4.67.3
7
+ opencv-python>=4.13.0
@@ -0,0 +1 @@
1
+ VisionGauge