19 lines
432 B
Python
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()
|