Working harvesting detection, working manufacturing detection.

This commit is contained in:
2026-08-12 13:54:40 -06:00
parent 2181655801
commit d7755df2e8
112 changed files with 1105 additions and 177 deletions
+23
View File
@@ -0,0 +1,23 @@
from pathlib import Path
import analyze
HARVESTING = sorted(Path("tests/images/harvesting").glob("*.png"))
NOT_HARVESTING = sorted(Path("tests/images/not_harvesting").glob("*.png"))
assert len(HARVESTING) > 0, "no images found in tests/images/harvesting"
assert len(NOT_HARVESTING) > 0, "no images found in tests/images/not_harvesting"
def test_harvesting_frames_report_harvesting():
for path in HARVESTING:
image = analyze.load_image(path)
assert image is not None, f"cannot load {path}"
assert analyze.is_harvesting(image)["is_harvesting"] is True, path
def test_not_harvesting_frames_report_not_harvesting():
for path in NOT_HARVESTING:
image = analyze.load_image(path)
assert image is not None, f"cannot load {path}"
assert analyze.is_harvesting(image)["is_harvesting"] is False, path