              detected_faces = dict()
              self.extractor.launch()
              self.check_thread_error()
              desc = "Running pass {} of {}: {}".format(phase + 1,
                                                        self.extractor.passes,
                                                        self.extractor.phase.title())
              status_bar = tqdm(self.extractor.detected_faces(),
                                total=to_process,
                                file=sys.stdout,
                                desc=desc)
              for idx, faces in enumerate(status_bar):
                  self.check_thread_error()
                  exception = faces.get("exception", False)
 
</s> remove             self.extractor.launch()
            self.check_thread_error()
 </s> add             self._extractor.launch()
            self._check_thread_error() </s> remove             is_final = self.extractor.final_pass
 </s> add             is_final = self._extractor.final_pass </s> remove                 self.check_thread_error()
 </s> add                 self._check_thread_error() </s> remove                 filename = faces["filename"]
 </s> add  </s> remove         for phase in range(self.extractor.passes):
 </s> add         for phase in range(self._extractor.passes):
                                                      self._extractor.passes,
                                                      self._extractor.phase.title())
            status_bar = tqdm(self._extractor.detected_faces(),
                              total=self._images.process_count,
              detected_faces = dict()
              self.extractor.launch()
              self.check_thread_error()
              desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self._extractor.passes,
                                                      self._extractor.phase.title())
            status_bar = tqdm(self._extractor.detected_faces(),
                              total=self._images.process_count,
                                                      self._extractor.passes,
                                                      self._extractor.phase.title())
            status_bar = tqdm(self._extractor.detected_faces(),
                              total=self._images.process_count,
                                                      self._extractor.passes,
                                                      self._extractor.phase.title())
            status_bar = tqdm(self._extractor.detected_faces(),
                              total=self._images.process_count,
                                                      self._extractor.passes,
                                                      self._extractor.phase.title())
            status_bar = tqdm(self._extractor.detected_faces(),
                              total=self._images.process_count,
                                file=sys.stdout,
                                desc=desc)
              for idx, faces in enumerate(status_bar):
                  self.check_thread_error()
                  exception = faces.get("exception", False)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 scripts.extract - code optimizations

Limit queue sizes to reduce RAM usage
Rename lib.image.BackgroundIO to ImageIO
Create separate ImagesLoader and ImagesSaver classes
Load/Save images from centralized lib.image.ImageIO
scripts.extract documentation 
scripts/extract.py