wrongmove/crawler/4_detect_floorplan.py

20 lines
432 B
Python
Raw Normal View History

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()