Eric P. Nusbaum commited on
Commit
b5e07e6
·
1 Parent(s): 4e8cd1a

Update Space

Browse files
app.py CHANGED
@@ -101,7 +101,7 @@ def draw_boxes(image, boxes, labels, scores, threshold=0.5):
101
 
102
  # Draw label
103
  label_text = f"{LABELS[label]}: {score:.2f}"
104
- text_size = draw.textsize(label_text, font=font)
105
  draw.rectangle([(xmin, ymin - text_size[1]), (xmin + text_size[0], ymin)], fill="red")
106
  draw.text((xmin, ymin - text_size[1]), label_text, fill="white", font=font)
107
 
 
101
 
102
  # Draw label
103
  label_text = f"{LABELS[label]}: {score:.2f}"
104
+ text_size = font.getsize(label_text) # Updated line
105
  draw.rectangle([(xmin, ymin - text_size[1]), (xmin + text_size[0], ymin)], fill="red")
106
  draw.text((xmin, ymin - text_size[1]), label_text, fill="white", font=font)
107
 
tensorflow/LICENSE DELETED
@@ -1,21 +0,0 @@
1
-  MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tensorflow/README.md DELETED
@@ -1,24 +0,0 @@
1
- # Custom Vision Export Object Detection Models
2
- This model is exported from [Custom Vision Service](https://customvision.ai)
3
-
4
- Please visit our [Sample scripts respository](https://github.com/Azure-Samples/customvision-export-samples).
5
-
6
- ## Prerequisites
7
- (For TensorFlow Lite model) TensorFlow Lite 2.1 or newer
8
-
9
- ## Input specification
10
- This model expects 320x320, 3-channel RGB images. Pixel values need to be in the range of [0-255].
11
-
12
- ## Output specification
13
- There are three outputs from this model.
14
-
15
- * detected_boxes
16
- The detected bounding boxes. Each bounding box is represented as [x1, y1, x2, y2] where (x1, y1) and (x2, y2) are the coordinates of box corners.
17
- * detected_scores
18
- Probability for each detected boxes.
19
- * detected_classes
20
- The class index for the detected boxes.
21
-
22
- # Reference
23
- * [Custom Vision Service documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/)
24
- * [Sample scripts](https://github.com/Azure-Samples/customvision-export-samples)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tensorflow/cvexport.manifest DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "DomainType": "ObjectDetection",
3
- "Platform": "TensorFlow",
4
- "Flavor": null,
5
- "ExporterVersion": "2.1",
6
- "ExportedDate": "2025-01-10T18:55:38.4488602Z",
7
- "IterationId": "159e9c3e-6435-4b9b-826d-ca39f5889fbc",
8
- "ModelFileName": "model.pb",
9
- "LabelFileName": "labels.txt",
10
- "MetadataPropsFileName": "metadata_properties.json",
11
- "ModelFileSHA1": "7b0dd1f64b803acf61535d256e662ccafa5ae0e1",
12
- "SchemaVersion": "1.0"
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tensorflow/labels.txt DELETED
@@ -1,9 +0,0 @@
1
- 1984 Topps
2
- 1987 Topps
3
- 1989 Bowman
4
- 1989 Fleer
5
- 1989 Upper Deck
6
- 1990 Donruss
7
- 1990 Topps
8
- 1991 Upper Deck
9
- 1993 Topps
 
 
 
 
 
 
 
 
 
 
tensorflow/metadata_properties.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "CustomVision.Metadata.AdditionalModelInfo": "",
3
- "CustomVision.Metadata.Version": "1.2",
4
- "CustomVision.Postprocess.Method": "SSD",
5
- "CustomVision.Postprocess.Yolo.Biases": "[]",
6
- "CustomVision.Postprocess.Yolo.NmsThreshold": "0.0",
7
- "CustomVision.Preprocess.CropHeight": "0",
8
- "CustomVision.Preprocess.CropMethod": "NoCrop",
9
- "CustomVision.Preprocess.CropWidth": "0",
10
- "CustomVision.Preprocess.MaxDimension": "0",
11
- "CustomVision.Preprocess.MaxScale": "0.0",
12
- "CustomVision.Preprocess.MinDimension": "0",
13
- "CustomVision.Preprocess.MinScale": "0.0",
14
- "CustomVision.Preprocess.NormalizeMean": "[0.0, 0.0, 0.0]",
15
- "CustomVision.Preprocess.NormalizeStd": "[1.0, 1.0, 1.0]",
16
- "CustomVision.Preprocess.ResizeMethod": "Stretch",
17
- "CustomVision.Preprocess.TargetHeight": "320",
18
- "CustomVision.Preprocess.TargetWidth": "320",
19
- "Image.BitmapPixelFormat": "Rgb8",
20
- "Image.ColorSpaceGamma": "SRGB",
21
- "Image.NominalPixelRange": "Normalized_0_1"
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tensorflow/model.pb DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:33d1cd529b08c684ab287dd874d64c94275607cd0c0316c5cb32349e81b49d86
3
- size 11687739