cv-benchkit 0.1.0__py3-none-any.whl

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.
cv_benchkit/metrics.py ADDED
@@ -0,0 +1,219 @@
1
+ """Evaluation metrics: IoU, GIoU, and confusion matrix computation.
2
+
3
+ All functions are vectorized with NumPy for efficient batch processing.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ from typing import Any
9
+
10
+ import numpy as np
11
+ from numpy.typing import NDArray
12
+
13
+
14
+ def compute_iou(
15
+ boxes_a: NDArray[np.floating[Any]],
16
+ boxes_b: NDArray[np.floating[Any]],
17
+ ) -> NDArray[np.floating[Any]]:
18
+ """Compute the pairwise Intersection-over-Union (IoU) matrix.
19
+
20
+ Parameters
21
+ ----------
22
+ boxes_a : ndarray, shape ``(M, 4)``
23
+ First set of boxes in xyxy format.
24
+ boxes_b : ndarray, shape ``(N, 4)``
25
+ Second set of boxes in xyxy format.
26
+
27
+ Returns
28
+ -------
29
+ ndarray, shape ``(M, N)``
30
+ IoU values in ``[0, 1]``.
31
+ """
32
+ boxes_a = np.asarray(boxes_a, dtype=np.float64)
33
+ boxes_b = np.asarray(boxes_b, dtype=np.float64)
34
+
35
+ if boxes_a.ndim == 1:
36
+ boxes_a = boxes_a.reshape(1, 4)
37
+ if boxes_b.ndim == 1:
38
+ boxes_b = boxes_b.reshape(1, 4)
39
+
40
+ m = boxes_a.shape[0]
41
+ n = boxes_b.shape[0]
42
+ if m == 0 or n == 0:
43
+ return np.empty((m, n), dtype=np.float64)
44
+
45
+ # Intersection
46
+ inter_x1 = np.maximum(boxes_a[:, None, 0], boxes_b[None, :, 0])
47
+ inter_y1 = np.maximum(boxes_a[:, None, 1], boxes_b[None, :, 1])
48
+ inter_x2 = np.minimum(boxes_a[:, None, 2], boxes_b[None, :, 2])
49
+ inter_y2 = np.minimum(boxes_a[:, None, 3], boxes_b[None, :, 3])
50
+
51
+ inter_w = np.maximum(0.0, inter_x2 - inter_x1)
52
+ inter_h = np.maximum(0.0, inter_y2 - inter_y1)
53
+ intersection = inter_w * inter_h
54
+
55
+ # Areas
56
+ area_a = (boxes_a[:, 2] - boxes_a[:, 0]) * (boxes_a[:, 3] - boxes_a[:, 1])
57
+ area_b = (boxes_b[:, 2] - boxes_b[:, 0]) * (boxes_b[:, 3] - boxes_b[:, 1])
58
+ union = area_a[:, None] + area_b[None, :] - intersection
59
+
60
+ # Avoid division by zero
61
+ iou: NDArray[np.floating[Any]] = np.where(union > 0, intersection / union, 0.0)
62
+ return iou
63
+
64
+
65
+ def compute_giou(
66
+ boxes_a: NDArray[np.floating[Any]],
67
+ boxes_b: NDArray[np.floating[Any]],
68
+ ) -> NDArray[np.floating[Any]]:
69
+ """Compute the pairwise Generalized IoU (GIoU) matrix.
70
+
71
+ GIoU = IoU - |C \\ (A U B)| / |C|
72
+
73
+ where C is the smallest enclosing box of A and B.
74
+
75
+ Parameters
76
+ ----------
77
+ boxes_a : ndarray, shape ``(M, 4)``
78
+ First set of boxes in xyxy format.
79
+ boxes_b : ndarray, shape ``(N, 4)``
80
+ Second set of boxes in xyxy format.
81
+
82
+ Returns
83
+ -------
84
+ ndarray, shape ``(M, N)``
85
+ GIoU values in ``[-1, 1]``.
86
+ """
87
+ boxes_a = np.asarray(boxes_a, dtype=np.float64)
88
+ boxes_b = np.asarray(boxes_b, dtype=np.float64)
89
+
90
+ if boxes_a.ndim == 1:
91
+ boxes_a = boxes_a.reshape(1, 4)
92
+ if boxes_b.ndim == 1:
93
+ boxes_b = boxes_b.reshape(1, 4)
94
+
95
+ m = boxes_a.shape[0]
96
+ n = boxes_b.shape[0]
97
+ if m == 0 or n == 0:
98
+ return np.empty((m, n), dtype=np.float64)
99
+
100
+ # Intersection
101
+ inter_x1 = np.maximum(boxes_a[:, None, 0], boxes_b[None, :, 0])
102
+ inter_y1 = np.maximum(boxes_a[:, None, 1], boxes_b[None, :, 1])
103
+ inter_x2 = np.minimum(boxes_a[:, None, 2], boxes_b[None, :, 2])
104
+ inter_y2 = np.minimum(boxes_a[:, None, 3], boxes_b[None, :, 3])
105
+
106
+ inter_w = np.maximum(0.0, inter_x2 - inter_x1)
107
+ inter_h = np.maximum(0.0, inter_y2 - inter_y1)
108
+ intersection = inter_w * inter_h
109
+
110
+ # Areas
111
+ area_a = (boxes_a[:, 2] - boxes_a[:, 0]) * (boxes_a[:, 3] - boxes_a[:, 1])
112
+ area_b = (boxes_b[:, 2] - boxes_b[:, 0]) * (boxes_b[:, 3] - boxes_b[:, 1])
113
+ union = area_a[:, None] + area_b[None, :] - intersection
114
+
115
+ iou = np.where(union > 0, intersection / union, 0.0)
116
+
117
+ # Enclosing box
118
+ enc_x1 = np.minimum(boxes_a[:, None, 0], boxes_b[None, :, 0])
119
+ enc_y1 = np.minimum(boxes_a[:, None, 1], boxes_b[None, :, 1])
120
+ enc_x2 = np.maximum(boxes_a[:, None, 2], boxes_b[None, :, 2])
121
+ enc_y2 = np.maximum(boxes_a[:, None, 3], boxes_b[None, :, 3])
122
+
123
+ enc_area = (enc_x2 - enc_x1) * (enc_y2 - enc_y1)
124
+
125
+ giou: NDArray[np.floating[Any]] = np.where(
126
+ enc_area > 0,
127
+ iou - (enc_area - union) / enc_area,
128
+ iou,
129
+ )
130
+ return giou
131
+
132
+
133
+ def compute_confusion_matrix(
134
+ gt_labels: NDArray[np.integer[Any]],
135
+ pred_labels: NDArray[np.integer[Any]],
136
+ gt_boxes: NDArray[np.floating[Any]],
137
+ pred_boxes: NDArray[np.floating[Any]],
138
+ num_classes: int,
139
+ iou_threshold: float = 0.5,
140
+ ) -> NDArray[np.int64]:
141
+ """Compute an object-detection confusion matrix.
142
+
143
+ Predictions are matched to ground-truth boxes using IoU. The matrix has
144
+ shape ``(num_classes + 1, num_classes + 1)`` where the last row/column
145
+ represents the "background" class (unmatched GT = FN, unmatched pred = FP).
146
+
147
+ Parameters
148
+ ----------
149
+ gt_labels : ndarray, shape ``(G,)``
150
+ Ground-truth class labels (0-indexed).
151
+ pred_labels : ndarray, shape ``(P,)``
152
+ Predicted class labels (0-indexed).
153
+ gt_boxes : ndarray, shape ``(G, 4)``
154
+ Ground-truth boxes in xyxy format.
155
+ pred_boxes : ndarray, shape ``(P, 4)``
156
+ Predicted boxes in xyxy format.
157
+ num_classes : int
158
+ Number of object classes (not counting background).
159
+ iou_threshold : float
160
+ IoU threshold for a match to count as a true positive.
161
+
162
+ Returns
163
+ -------
164
+ ndarray, shape ``(num_classes + 1, num_classes + 1)``
165
+ Confusion matrix where ``[i, j]`` = count of GT class *i* predicted as
166
+ class *j*. The last index is "background".
167
+ """
168
+ gt_labels = np.asarray(gt_labels, dtype=np.int64)
169
+ pred_labels = np.asarray(pred_labels, dtype=np.int64)
170
+ gt_boxes = np.asarray(gt_boxes, dtype=np.float64)
171
+ pred_boxes = np.asarray(pred_boxes, dtype=np.float64)
172
+
173
+ bg = num_classes # background index
174
+ cm = np.zeros((num_classes + 1, num_classes + 1), dtype=np.int64)
175
+
176
+ num_gt = gt_labels.shape[0]
177
+ num_pred = pred_labels.shape[0]
178
+
179
+ if num_gt == 0 and num_pred == 0:
180
+ return cm
181
+
182
+ if num_gt == 0:
183
+ # All predictions are false positives
184
+ for pl in pred_labels:
185
+ cm[bg, int(pl)] += 1
186
+ return cm
187
+
188
+ if num_pred == 0:
189
+ # All ground truths are false negatives
190
+ for gl in gt_labels:
191
+ cm[int(gl), bg] += 1
192
+ return cm
193
+
194
+ iou_matrix = compute_iou(gt_boxes, pred_boxes)
195
+ matched_gt: set[int] = set()
196
+ matched_pred: set[int] = set()
197
+
198
+ # Greedy matching: for each pred, find best IoU GT
199
+ for pred_idx in range(num_pred):
200
+ ious = iou_matrix[:, pred_idx]
201
+ best_gt_idx = int(np.argmax(ious))
202
+ if ious[best_gt_idx] >= iou_threshold and best_gt_idx not in matched_gt:
203
+ matched_gt.add(best_gt_idx)
204
+ matched_pred.add(pred_idx)
205
+ gt_cls = int(gt_labels[best_gt_idx])
206
+ pred_cls = int(pred_labels[pred_idx])
207
+ cm[gt_cls, pred_cls] += 1
208
+ else:
209
+ # False positive
210
+ pred_cls = int(pred_labels[pred_idx])
211
+ cm[bg, pred_cls] += 1
212
+
213
+ # Unmatched GT → false negatives
214
+ for gt_idx in range(num_gt):
215
+ if gt_idx not in matched_gt:
216
+ gt_cls = int(gt_labels[gt_idx])
217
+ cm[gt_cls, bg] += 1
218
+
219
+ return cm
cv_benchkit/py.typed ADDED
File without changes
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.5
2
+ Name: cv-benchkit
3
+ Version: 0.1.0
4
+ Summary: Computer-vision benchmark toolkit: bbox format converters, dataset translators, and evaluation metrics.
5
+ Project-URL: Homepage, https://github.com/udayraj1238/cv-benchkit
6
+ Project-URL: Repository, https://github.com/udayraj1238/cv-benchkit
7
+ Project-URL: Issues, https://github.com/udayraj1238/cv-benchkit/issues
8
+ Author-email: Uday Raj <rajuday6002@gmail.com>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: bbox,coco,computer-vision,iou,metrics,voc,yolo
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: numpy>=1.24
26
+ Requires-Dist: pydantic>=2.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: mypy>=1.10; extra == 'dev'
29
+ Requires-Dist: pre-commit>=3.0; extra == 'dev'
30
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
31
+ Requires-Dist: pytest>=7.0; extra == 'dev'
32
+ Requires-Dist: ruff>=0.4; extra == 'dev'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # cv-benchkit
36
+
37
+ [![CI](https://github.com/udayraj1238/cv-benchkit/actions/workflows/ci.yml/badge.svg)](https://github.com/udayraj1238/cv-benchkit/actions)
38
+ [![PyPI](https://img.shields.io/pypi/v/cv-benchkit.svg)](https://pypi.org/project/cv-benchkit/)
39
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
40
+ [![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/)
41
+
42
+ Unified computer vision annotation converter and model benchmarking toolkit for PyTorch and NumPy.
43
+
44
+ ---
45
+
46
+ ## Features
47
+
48
+ - **Format Converters**: Seamless, vectorized conversions between `xyxy`, `xywh` (COCO), `cxcywh`, and normalized (YOLO) bounding-box representations.
49
+ - **Dataset Translators**: Two-way translations between **COCO JSON**, **YOLO txt**, and **Pascal VOC XML**.
50
+ - **Vectorized Evaluation Metrics**: Fast NumPy implementations of pairwise **IoU**, **GIoU**, and multiclass **confusion matrix** calculations with background handling.
51
+ - **CLI Utility**: Command-line interface for fast dataset conversion and validation.
52
+ - **Strictly Typed & Tested**: 100% typed with PEP 561 marker, passing `mypy --strict`, with 95%+ unit test coverage.
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ Using `uv` (recommended):
59
+ ```bash
60
+ uv add cv-benchkit
61
+ ```
62
+
63
+ Or using `pip`:
64
+ ```bash
65
+ pip install cv-benchkit
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Quick Start
71
+
72
+ ### Python API
73
+
74
+ ```python
75
+ import numpy as np
76
+ from cv_benchkit import compute_iou, xyxy_to_normalized, validate_coco_file
77
+
78
+ # Compute IoU
79
+ boxes_a = np.array([[0, 0, 100, 100], [50, 50, 150, 150]])
80
+ boxes_b = np.array([[20, 20, 120, 120]])
81
+ iou_matrix = compute_iou(boxes_a, boxes_b)
82
+ print(iou_matrix)
83
+
84
+ # Validate and convert COCO annotations
85
+ dataset = validate_coco_file("path/to/annotations.json")
86
+ ```
87
+
88
+ ### CLI
89
+
90
+ ```bash
91
+ # Validate COCO dataset
92
+ cv-benchkit validate annotations.json
93
+
94
+ # Convert COCO to YOLO format
95
+ cv-benchkit convert --from coco --to yolo --input annotations.json --output ./yolo_labels
96
+
97
+ # Convert YOLO to COCO format
98
+ cv-benchkit convert --from yolo --to coco --input ./yolo_labels --output ./coco_out --image-width 640 --image-height 480 --categories person car bicycle
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Development
104
+
105
+ ```bash
106
+ git clone https://github.com/udayraj1238/cv-benchkit.git
107
+ cd cv-benchkit
108
+ uv sync --extra dev
109
+ uv run pytest
110
+ uv run ruff check .
111
+ uv run mypy src/
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Contributing
117
+
118
+ We welcome community contributions! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) and check out our [Good First Issues Catalog](docs/GOOD_FIRST_ISSUES_CATALOG.md).
119
+
120
+ ---
121
+
122
+ ## License
123
+
124
+ Apache-2.0. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,10 @@
1
+ cv_benchkit/__init__.py,sha256=eW52tEHLyWO-Oz6s2aBhCptJ3UZ2T6G_0ciwXNinCsU,939
2
+ cv_benchkit/cli.py,sha256=rbfrvRH3-rTWWw7l_Ua7swDtmEqJp7-OWVRjmbB9FHg,5590
3
+ cv_benchkit/converters.py,sha256=MuqP-YlY02AYJP-uzDbIMqZKW0DWdzkzsICd4ZpEXG0,18582
4
+ cv_benchkit/metrics.py,sha256=B7eLRT_8U2KNaW4cRWqmZ5ESxZpbQdY6M8tqNKFM_Ec,7071
5
+ cv_benchkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ cv_benchkit-0.1.0.dist-info/METADATA,sha256=brazet1UvkTHF-vQP4JzpvqSyTF4Q8RV6jQVhoPV-8A,4127
7
+ cv_benchkit-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
8
+ cv_benchkit-0.1.0.dist-info/entry_points.txt,sha256=Dkf3_XclQFE91Xh7YwSrXaKkBy4veqtIBBCoF3hI-6o,53
9
+ cv_benchkit-0.1.0.dist-info/licenses/LICENSE,sha256=7NhmGvkqAYo8llVl0drXCF8cuI_uUJiGJJRiZbNI5oQ,10201
10
+ cv_benchkit-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cv-benchkit = cv_benchkit.cli:main
@@ -0,0 +1,178 @@
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
+ Copyright 2026 Uday Raj