def METHOD_NAME(self):
    if not os.path.exists('./gallary'):
        os.mkdir('./gallary')
        print('gallary文件夹不存在,已自动创建,请在该文件夹下放图片,再运行此程序')
        return False
    filenames = [file for file in os.listdir('gallary') if os.path.isfile(os.path.join('gallary', file))]
    if not self.flush:
        if os.path.exists('manifest.json'):
            with open('manifest.json','r') as f:
                if f.read():
                    manifest = json.load(f)
                    _manifest = [i['source'] for i in list(manifest.values())]
                    self.md5set = self.md5set | {i for i in manifest.keys()}
                    filenames = list(set(filenames) - set(_manifest))
                    self.pc = {**manifest}
        if os.path.exists('manifest_mobile.json'):
            with open('manifest_mobile.json','r') as f:
                if f.read():
                    manifest = json.load(f)
                    _manifest = [i['source'] for i in manifest.values()]
                    self.md5set = self.md5set | {i for i in manifest.keys()}
                    filenames = list(set(filenames) - set(_manifest))
                    self.mobile = {**manifest}
    fileslen = len(filenames)
    progress = 0
    with futures.ProcessPoolExecutor(max_workers=8) as executor:
        for result in zip(filenames,executor.map(self.process_image, filenames)):
            filename , imgprocess = result
            if imgprocess == 0:
                self.status['Falseid'] += 1
                self.errorfiles.append(filename)
                print(f"\n出现错误文件:{filename}")
            elif imgprocess == 1:
                self.status['Repeatid'] += 1
                self.repeatfiles.append(filename)
                print(f"\n{filename} 已存在")
            elif imgprocess == 2:
                self.status['Failedid'] += 1
                self.failedfiles.append(filename)
                print(f"\n{filename} 尺寸不达标")
            else:
                self.status['Trueid'] += 1
                if imgprocess.get('pc'):
                    self.pc.update(imgprocess['pc'])
                elif imgprocess.get('mobile'):
                    self.mobile.update(imgprocess['mobile'])
            progress += 1
            print(f"\r{filename} 已进行处理，进度 {progress}/{fileslen}",end="",flush=True)
    with open('manifest.json','w+') as json_file:
        json.dump(self.pc,json_file)
    with open('manifest_mobile.json','w+') as json_file:
        json.dump(self.mobile,json_file)
    print(f"""
        任务已完成
        总计数量：{fileslen}
        成功数量：{self.status['Trueid']}
        失败数量：{self.status['Falseid']}
        失败文件：{self.errorfiles}
        重复数量：{self.status['Repeatid']}
        重复文件：{self.repeatfiles}
        不合格数量：{self.status['Failedid']}
        不合格文件：{self.failedfiles}
        当前总计   pc   图片数量：{len(self.pc)}
        当前总计 mobile 图片数量：{len(self.mobile)}
        """)