Marthee commited on
Commit
dbde78a
·
verified ·
1 Parent(s): b6cf08c

Update doors_fasterrcnn.py

Browse files
Files changed (1) hide show
  1. doors_fasterrcnn.py +1 -7
doors_fasterrcnn.py CHANGED
@@ -431,21 +431,15 @@ def main_run(img_pillow,pdf_fullpath, weights_path, weights_path2, pdf_name,pdfp
431
 
432
  width_pixels, lines, sanda, line_midpoint, double_count, door_type = get_door_info_double(doors_info_double, width_pixels, lines, sanda, line_midpoint, door_type)
433
 
434
- print("Single Door Count:")
435
- print(single_count)
436
- print("Doube Door Count:")
437
- print(double_count)
438
  real_width = pxl2meter(width_pixels, ratio)
439
- #real_double = pxl2meter(doubleD_width, ratio)
440
  char_width = width_as_char(real_width)
441
- #char_d_width = width_as_char(real_double)
442
 
443
  pdf_document = add_annotations_to_pdf(img_pillow, pdf_fullpath, lines, sanda, char_width, line_midpoint, door_type)
444
  modified_pdf_data = pdf_document.tobytes()
445
  OutputPdfStage2=adjustannotations(modified_pdf_data)
 
446
  #Dataframe for Doors count
447
  doors_count = {'Type': ['Single Doors', 'Double Doors'], 'Quantity': [single_count, double_count]}
448
- #doors_count = {'Type': ['Single Doors'], 'Quantity': [len(real_width)]}
449
  df_doors = pd.DataFrame(doors_count)
450
 
451
  doc2 =fitz.open('pdf',OutputPdfStage2)
 
431
 
432
  width_pixels, lines, sanda, line_midpoint, double_count, door_type = get_door_info_double(doors_info_double, width_pixels, lines, sanda, line_midpoint, door_type)
433
 
 
 
 
 
434
  real_width = pxl2meter(width_pixels, ratio)
 
435
  char_width = width_as_char(real_width)
 
436
 
437
  pdf_document = add_annotations_to_pdf(img_pillow, pdf_fullpath, lines, sanda, char_width, line_midpoint, door_type)
438
  modified_pdf_data = pdf_document.tobytes()
439
  OutputPdfStage2=adjustannotations(modified_pdf_data)
440
+
441
  #Dataframe for Doors count
442
  doors_count = {'Type': ['Single Doors', 'Double Doors'], 'Quantity': [single_count, double_count]}
 
443
  df_doors = pd.DataFrame(doors_count)
444
 
445
  doc2 =fitz.open('pdf',OutputPdfStage2)