Commit
Β·
48b2886
1
Parent(s):
cc71572
Refactor output schema to use list for objects and simplify feature definitions
Browse files- detect-objects.py +5 -5
detect-objects.py
CHANGED
|
@@ -331,13 +331,13 @@ def main():
|
|
| 331 |
# Define output schema before processing
|
| 332 |
logger.info("π Creating output schema...")
|
| 333 |
new_features = dataset.features.copy()
|
| 334 |
-
new_features["objects"] =
|
| 335 |
{
|
| 336 |
-
"bbox":
|
| 337 |
-
"category":
|
| 338 |
-
"score":
|
| 339 |
}
|
| 340 |
-
|
| 341 |
|
| 342 |
# Process dataset with explicit output features
|
| 343 |
logger.info("π Processing images...")
|
|
|
|
| 331 |
# Define output schema before processing
|
| 332 |
logger.info("π Creating output schema...")
|
| 333 |
new_features = dataset.features.copy()
|
| 334 |
+
new_features["objects"] = [
|
| 335 |
{
|
| 336 |
+
"bbox": [float, float, float, float],
|
| 337 |
+
"category": class_name,
|
| 338 |
+
"score": float,
|
| 339 |
}
|
| 340 |
+
]
|
| 341 |
|
| 342 |
# Process dataset with explicit output features
|
| 343 |
logger.info("π Processing images...")
|