wrongmove/crawler/4_detect_floorplan.py
Viktor Barzin 48f694e002
[4/n] click-ify add detect floorplan command
run with
poetry run python main.py --step detect_floorplan
2025-05-11 19:06:08 +00:00

19 lines
432 B
Python

from data_access import Listing
from tqdm import tqdm
def detect_floorplan():
listings = Listing.get_all_listings()
for listing in tqdm(listings):
tqdm.write(str(listing.identifier))
# listing.calculate_sqm_model() # using google/deplot model. Too slow, rather use tesseract
listing.calculate_sqm_ocr(recalculate=False)
def main():
detect_floorplan()
if __name__ == "__main__":
main()