Initial commit for push folder
This commit is contained in:
commit
c4af9fcbb5
82 changed files with 3294 additions and 0 deletions
20
recognization/code/test_empty.py
Normal file
20
recognization/code/test_empty.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
if current_dir not in sys.path:
|
||||
sys.path.insert(0, current_dir)
|
||||
|
||||
from empty_shelf_detector import detect_and_draw_empty_slots
|
||||
|
||||
if __name__ == "__main__":
|
||||
image_path = "image.jpg"
|
||||
print(f"Processing empty shelf detection on {image_path}...")
|
||||
annotated, empty_slots = detect_and_draw_empty_slots(
|
||||
image_path,
|
||||
output_path="detected_empty_slots.jpg"
|
||||
)
|
||||
print(f"Detected {len(empty_slots)} empty shelf slots:")
|
||||
for s in empty_slots:
|
||||
print(f" - Slot [{s['id']}]: Row {s['row_index']}, Box={s['box']}, Width={s['width']}px, Est. Missing Items={s['missing_items_est']}")
|
||||
print(f"Visualization saved to: detected_empty_slots.jpg")
|
||||
Loading…
Add table
Add a link
Reference in a new issue