workaround is just to supply the camera object with an 'engine' variable for training also.
Incorrect import and reference of modules in sorter.py.
from scipy import ndimage used and then in def is_good_photo(img, width, height, mean, sliding_window): if (filter_type == 'center_of_mass'): center = scipy.ndimage.measurements.center_of_mass(img) detection_zone_avg = (center[0] + center[1]) / 2
scipy.ndimage.measurements.center_of_mass(img) should be ndimage.measurements.center_of_mass(img).
Does not look like the code supplied has been successfully run. It would be good to update with the version that is used in the tutorial.
if args.will_sort: engine = edgetpu.classification.engine.ClassificationEngine(model_path) mode = "sort" else: mode = "train"
workaround is just to supply the camera object with an 'engine' variable for training also.
from scipy import ndimage
used and then in def is_good_photo(img, width, height, mean, sliding_window):if (filter_type == 'center_of_mass'): center = scipy.ndimage.measurements.center_of_mass(img) detection_zone_avg = (center[0] + center[1]) / 2
scipy.ndimage.measurements.center_of_mass(img) should be ndimage.measurements.center_of_mass(img).
Does not look like the code supplied has been successfully run. It would be good to update with the version that is used in the tutorial.