当前位置:首页>python>别再手动抠图了!python的15个抠图大模型

别再手动抠图了!python的15个抠图大模型

  • 2026-06-27 22:37:45
别再手动抠图了!python的15个抠图大模型

主流 Python 图像抠图模型的介绍、安装、代码示例与适用场景。共计 15 个模型/库。


一、rembg(U²-Net)

https://github.com/danielgatis/rembghttps://github.com/xuebinqin/U-2-Net

介绍

rembg 是目前 Python 生态中最流行的背景移除库。底层基于 U²-Net 深度学习模型,能自动识别图像主体并移除背景,无需手动标记(trimap-free)。2023 年发布后迅速在 GitHub 斩获 15k+ stars,原因是安装即用、API 极简——两行代码出结果。提供命令行、Python API、HTTP 服务端等多种使用方式,是整个抠图生态中社区最繁荣的工具。

U²-Net 的核心架构是一个嵌套的 U 形网络(nested U-structure),在显著目标检测(SOD)任务上表现优异,能捕捉到细节边缘(如头发丝)。它也是后来许多抠图模型(包括 RMBG 早期版本)的底层基础。

安装

pip install rembg

首次运行时会自动下载模型文件(~176MB),存储在 ~/.u2net/ 目录。

代码

from rembg import removefrom PIL import Image# 读取输入图像input_img = Image.open("photo.jpg")# 移除背景 —— 一行搞定output_img = remove(input_img)# 保存透明背景结果output_img.save("photo_no_bg.png")

命令行用法

rembg i photo.jpg photo_no_bg.png

适用场景

  • 电商商品图批量去背景
  • 证件照背景替换
  • 图像预处理(为后续模型准备干净的前景)

注意点

  • 默认模型对人像/物体效果好,复杂场景(如透明物体、密集人群)边缘可能残留
  • 处理大图时内存占用较高,建议先 resize 到 1024px 以内
  • 技术上已被 BiRefNet / RMBG-2.0 超越,但作为生态入口仍不可替代

二、MODNet(Portrait Matting)

https://github.com/ZHKKKe/MODNet

介绍

MODNet 是商汤科技(SenseTime)提出的轻量级实时人像抠图模型,专为实时应用和移动端部署设计。与 U²-Net 不同,MODNet 聚焦于人像领域,在头发丝、半透明衣物等细节上表现更优。支持一键导出 ONNX 格式,可在移动端和 Web 端部署。

核心优势:轻量、快速、人像边缘精细。输入 512×512 的图像,CPU 上也能在 1 秒内完成推理。模型仅 25MB,是移动端和实时视频流的首选方案。

安装

pip install onnxruntime pillow numpy opencv-python# 下载预训练模型wget https://github.com/ZHKKKe/MODNet/releases/download/v1.0/modnet_photographic_portrait_matting.onnx

代码

import onnxruntimeimport numpy as npfrom PIL import Image# 加载 ONNX 模型session = onnxruntime.InferenceSession("modnet_photographic_portrait_matting.onnx")defmodnet_remove_bg(img_path, output_path, size=(512512)):"""MODNet 人像背景移除"""    img = Image.open(img_path).convert("RGB")    orig_w, orig_h = img.size# 预处理:缩放到模型输入尺寸    img_resized = img.resize(size, Image.BICUBIC)    img_np = np.array(img_resized).astype(np.float32)    img_np = img_np.transpose(201) / 255.0# CHW 格式 + 归一化    img_np = np.expand_dims(img_np, axis=0)# 推理:输出 alpha 遮罩    inputs = {session.get_inputs()[0].name: img_np}    alpha = session.run(None, inputs)[0][00]# 还原到原始尺寸    alpha = Image.fromarray((alpha * 255).astype(np.uint8))    alpha = alpha.resize((orig_w, orig_h), Image.BICUBIC)# 合成透明背景    img = img.resize((orig_w, orig_h))    img.putalpha(alpha)    img.save(output_path)modnet_remove_bg("portrait.jpg""portrait_no_bg.png")

适用场景

  • 人像证件照处理
  • 视频会议虚拟背景(实时抠像)
  • 移动端人像美颜/换背景 App

三、SAM(Segment Anything Model)

https://github.com/facebookresearch/segment-anything

介绍

Meta 在 2023 年发布的通用分割基础模型,在 1100 万张图像的 10 亿个掩码上训练。SAM 不是专门的抠图模型,但它能分割图像中的任何物体——给定一个点、框或文本提示,就能精确分割出目标。这使得它在抠图任务上有极高的灵活性:你不需要它"自动"找到前景,而是可以告诉它前景是什么。

需要安装官方 segment-anything 库并下载模型(ViT-H 版本 ~2.4GB)。

安装

pip install git+https://github.com/facebookresearch/segment-anything.gitpip install opencv-python pillow torch torchvision# 下载模型:https://github.com/facebookresearch/segment-anything#model-checkpoints

代码

import cv2import torchimport numpy as npfrom PIL import Imagefrom segment_anything import sam_model_registry, SamAutomaticMaskGenerator# 加载模型sam = sam_model_registry["vit_h"](checkpoint="sam_vit_h_4b8939.pth")sam.to("cuda"if torch.cuda.is_available() else"cpu")# 自动生成所有掩码mask_generator = SamAutomaticMaskGenerator(sam)image = cv2.imread("photo.jpg")image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)masks = mask_generator.generate(image_rgb)# 取面积最大的掩码作为"主体"largest_mask = max(masks, key=lambda x: x["area"])# 应用到原图result = Image.fromarray(image_rgb).convert("RGBA")alpha = Image.fromarray((largest_mask["segmentation"] * 255).astype(np.uint8))result.putalpha(alpha)result.save("photo_sam_bg.png")

带提示点的精确分割(更实用)

from segment_anything import SamPredictorpredictor = SamPredictor(sam)predictor.set_image(image_rgb)h, w = image_rgb.shape[:2]input_point = np.array([[w // 2, h // 2]])input_label = np.array([1])  # 1 = 前景masks, scores, _ = predictor.predict(    point_coords=input_point,    point_labels=input_label,    multimask_output=False)result = Image.fromarray(image_rgb).convert("RGBA")result.putalpha(Image.fromarray((masks[0] * 255).astype(np.uint8)))result.save("photo_sam_prompt_bg.png")

适用场景

  • 复杂场景:多人合照、杂物背景、非标准物体
  • 批量图片需要同一类物体的分割
  • 学术研究、数据集标注

四、BRIA RMBG-2.0

https://huggingface.co/briaai/RMBG-2.0https://huggingface.co/briaai/RMBG-1.4

介绍

BRIA AI 在 2024 年发布的 RMBG-2.0,在多个抠图基准上达到 SOTA。它是一个全能型背景移除模型,底层基于 BiRefNet 架构(见下一节),针对电商商品图、人像、动植物等数十个类别做了专门优化。与 rembg 1.x 相比,RMBG-2.0 在边缘精度和复杂背景场景下有显著提升。

部分版本可商用(需确认 License)。支持 HuggingFace 直接加载。

安装

pip install torch torchvision pillow huggingface_hub transformers

代码

import torchimport numpy as npfrom PIL import Imagefrom torchvision import transformsclassRMBG2:def__init__(self):from transformers import AutoModelForImageSegmentation        self.model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-2.0", trust_remote_code=True        )        self.model.to("cuda"if torch.cuda.is_available() else"cpu")        self.model.eval()defremove_bg(self, img_path, output_path):        img = Image.open(img_path).convert("RGB")        transform = transforms.Compose([            transforms.Resize((10241024)),            transforms.ToTensor(),            transforms.Normalize([0.4850.4560.406], [0.2290.2240.225])        ])        input_tensor = transform(img).unsqueeze(0)        input_tensor = input_tensor.to(self.model.device)with torch.no_grad():            preds = self.model(input_tensor)[-1].sigmoid().cpu()        mask = preds.squeeze().numpy()        mask = Image.fromarray((mask * 255).astype(np.uint8))        mask = mask.resize(img.size, Image.LANCZOS)        img.putalpha(mask)        img.save(output_path)rmbg2 = RMBG2()rmbg2.remove_bg("product.jpg""product_no_bg.png")

适用场景

  • 电商商品图(白底图需求)
  • 高质量人像抠图
  • 需要比 rembg 更精细边缘的场景

五、BiRefNet(RMBG-2.0 的基石)

https://github.com/ZhengPeng7/BiRefNet

介绍

BiRefNet 是 RMBG-2.0 的底层架构,但它本身是一个更庞大的模型家族——提供 10 种不同变体,覆盖从极致精度到极致速度的全部需求。官方提供了多个专用微调版本:

变体
定位
BiRefNet
 (通用)
全能型,平衡精度与速度
BiRefNet-portrait
人像专用抠图
BiRefNet-matting
通用抠图,高精度 alpha 遮罩
BiRefNet-lite
轻量版,适合 CPU / 移动端
BiRefNet-DIS
二分图像分割,极致边缘精度

BiRefNet 的核心创新是双边参考网络(Bilateral Reference Network)——将图像的局部细节和全局上下文分别编码后再融合,从而在细节保持和语义理解之间取得平衡。如果你需要为特定场景微调抠图模型,BiRefNet 是目前最灵活的基座。

安装

pip install torch torchvision pillow opencv-python timmgit clone https://github.com/ZhengPeng7/BiRefNet.gitcd BiRefNet

代码

import torchimport numpy as npfrom PIL import Imagefrom torchvision import transformsimport syssys.path.append("./BiRefNet")defbirefnet_remove_bg(img_path, output_path, model_type="general"):"""BiRefNet 通用背景移除    model_type: 'general' | 'portrait' | 'matting' | 'lite'    """# 根据类型加载对应权重    ckpt_paths = {"general""BiRefNet/ckpt/BiRefNet.pth","portrait""BiRefNet/ckpt/BiRefNet-portrait.pth","matting""BiRefNet/ckpt/BiRefNet-matting.pth",    }from models.birefnet import BiRefNet    model = BiRefNet(bb_pretrained=False)    state_dict = torch.load(ckpt_paths[model_type], map_location="cpu")    model.load_state_dict(state_dict, strict=True)    model.eval()    img = Image.open(img_path).convert("RGB")    orig_size = img.size    transform = transforms.Compose([        transforms.Resize((10241024)),        transforms.ToTensor(),        transforms.Normalize([0.4850.4560.406], [0.2290.2240.225])    ])    input_tensor = transform(img).unsqueeze(0)with torch.no_grad():        pred = model(input_tensor)[-1].sigmoid().cpu()    mask = pred.squeeze().numpy()    mask = Image.fromarray((mask * 255).astype(np.uint8))    mask = mask.resize(orig_size, Image.LANCZOS)    img.putalpha(mask)    img.save(output_path)birefnet_remove_bg("photo.jpg""photo_birefnet.png", model_type="portrait")

适用场景

  • 需要微调自有数据的企业级方案
  • 需要根据场景切换专用模型(人像/物体/轻量)
  • 作为 RMBG-2.0 的替代,追求更细粒度控制

六、InSPyReNet(Transformer 架构、CPU 可用)

https://github.com/plemeri/InSPyReNet

介绍

InSPyReNet 基于 Transformer 架构,最大的特点是模型小巧轻便——即使在 CPU 上也能运行,速度很快。它专为本地资源有限但追求高效率的场景设计,特别适合没有 GPU 的个人用户。

与大多数基于 CNN 的抠图模型不同,InSPyReNet 使用 Transformer 的自注意力机制来捕获全局上下文,这使它在处理复杂背景中的主体分离时有一定优势。在 ComfyUI 社区中有活跃的集成和使用。

安装

pip install torch torchvision pillow opencv-pythongit clone https://github.com/plemeri/InSPyReNet.gitcd InSPyReNetpip install -r requirements.txt

代码

import torchimport numpy as npfrom PIL import Imagefrom torchvision import transformsdefinspyrenet_remove_bg(img_path, output_path):"""InSPyReNet 背景移除 —— CPU 友好"""# 加载模型(可通过 torch.hub 或克隆仓库后本地加载)from inspyrenet import InSPyReNet_S    model = InSPyReNet_S(pretrained=True)    device = "cuda"if torch.cuda.is_available() else"cpu"    model.to(device)    model.eval()    img = Image.open(img_path).convert("RGB")    orig_size = img.size    transform = transforms.Compose([        transforms.Resize((10241024)),        transforms.ToTensor(),        transforms.Normalize([0.4850.4560.406], [0.2290.2240.225])    ])    input_tensor = transform(img).unsqueeze(0).to(device)with torch.no_grad():        pred = model(input_tensor)if isinstance(pred, (list, tuple)):            pred = pred[-1]        mask = pred.sigmoid().cpu().squeeze().numpy()    mask = Image.fromarray((mask * 255).astype(np.uint8))    mask = mask.resize(orig_size, Image.LANCZOS)    img.putalpha(mask)    img.save(output_path)inspyrenet_remove_bg("photo.jpg""photo_inspyrenet.png")

适用场景

  • 无 GPU 环境下的抠图需求
  • 本地笔记本快速批量处理
  • 作为 ComfyUI 工作流中的抠图节点

七、BEN2(4K 高清 + 视频抠图)

https://github.com/PramaLLC/BEN2

介绍

BEN2(Background Erase Network v2)是一个优先保证前景主体完整的背景擦除模型。与其他模型追求"极致边缘精度"不同,BEN2 的设计理念是"宁可留一点背景,也不能切掉前景"——这对电商产品图至关重要:你不能把产品的边角给切没了。

BEN2 的另一大亮点是能处理 4K 超高清图像和视频,在同类模型中非常少见。如果你需要批量处理高清商品图或视频抠图,BEN2 是目前最合适的选择之一。

安装

pip install torch torchvision pillow opencv-pythongit clone https://github.com/PramaLLC/BEN2.gitcd BEN2pip install -r requirements.txt

代码

import torchimport numpy as npfrom PIL import Imagefrom torchvision import transformsdefben2_remove_bg(img_path, output_path):"""BEN2 背景移除 —— 优先保留前景完整性"""# 加载模型(具体加载方式参见官方仓库)# 此处给出调用框架,实际权重文件从 releases 下载from ben2 import BEN2Model    model = BEN2Model.from_pretrained("ben2_weights.pth")    device = "cuda"if torch.cuda.is_available() else"cpu"    model.to(device)    model.eval()    img = Image.open(img_path).convert("RGB")    orig_size = img.size# BEN2 支持高分辨率输入    transform = transforms.Compose([        transforms.ToTensor(),        transforms.Normalize([0.50.50.5], [0.50.50.5])    ])    input_tensor = transform(img).unsqueeze(0).to(device)with torch.no_grad():        mask = model(input_tensor).sigmoid().cpu().squeeze().numpy()    mask = Image.fromarray((mask * 255).astype(np.uint8))    mask = mask.resize(orig_size, Image.LANCZOS)    img.putalpha(mask)    img.save(output_path)ben2_remove_bg("product_4k.jpg""product_4k_bg.png")

适用场景

  • 电商产品图(必须保证主体完整)
  • 4K 高清商业摄影
  • 视频背景擦除

八、PP-Matting(PaddlePaddle、发丝级精度)

https://github.com/PaddlePaddle/PaddleSeg https://openi.pcl.ac.cn/PaddlePaddle/PaddleSeg/modelart

介绍

PP-Matting 是百度飞桨(PaddlePaddle)生态下的高精度人像抠图模型,以出色的发丝级精细分割能力闻名。它在 PaddleSeg 框架下提供了多种场景和分辨率变体,覆盖从移动端到服务端的完整部署需求。

PP-Matting 的核心优势在于其基于 PaddlePaddle 的训练和推理优化——如果你已经在使用百度飞桨生态(如 PaddleOCR、PaddleDetection),PP-Matting 可以无缝集成。对中文开发者友好,文档和社区支持完善。

安装

pip install paddlepaddle paddleseg

代码

import paddlefrom paddleseg.models import PPMattingfrom paddleseg.utils import predictimport cv2from PIL import Imageimport numpy as npdefppmatting_remove_bg(img_path, output_path):"""PP-Matting 人像背景移除"""    model = PPMatting(backbone="PP-Matting")# 加载预训练权重    model_path = "ppmatting_pretrained.pdparams"    model.set_state_dict(paddle.load(model_path))    model.eval()    img = cv2.imread(img_path)    img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)    img_tensor = paddle.to_tensor(img_rgb.transpose(201)[None, ...].astype(np.float32))with paddle.no_grad():        alpha = model(img_tensor)[0].numpy()[00]# 后处理    alpha = (alpha * 255).clip(0255).astype(np.uint8)    result = Image.fromarray(img_rgb).convert("RGBA")    result.putalpha(Image.fromarray(alpha))    result.save(output_path)ppmatting_remove_bg("portrait.jpg""portrait_ppmatting.png")

适用场景

  • 发丝级精度的证件照/形象照
  • PaddlePaddle 生态用户
  • 需要多种分辨率变体的服务端部署

九、Background Matting

https://github.com/hyHy-1990/hy_bgmatting

介绍

Background Matting 是一种需要额外纯背景图辅助计算的高精度抠图模型。它的核心创新在于:如果你能提供一张没有人物的"纯背景"照片作为参考,模型就可以非常精确地将前景人物从当前帧中分离出来。

在 RGB-D 摄像头辅助下,可以做到 4K 分辨率 30fps 的实时抠像效果,多用于专业影视制作和虚拟演播室。虽然使用门槛比 trimap-free 模型高(需要背景图),但精度也更高。

安装

git clone https://github.com/hyHy-1990/hy_bgmatting.gitcd hy_bgmattingpip install -r requirements.txt

代码

import torchimport cv2import numpy as npfrom PIL import Imagedefbg_matting_remove(img_path, bg_path, output_path):"""Background Matting —— 需要参考背景图"""# 加载原图和背景参考图    img = cv2.imread(img_path)    bg = cv2.imread(bg_path)# 转为 RGB    img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)    bg_rgb = cv2.cvtColor(bg, cv2.COLOR_BGR2RGB)# 模型推理(此处为框架性示例,实际需加载具体权重)# 核心思路:比较 img 和 bg 的差异 → 生成 alpha 遮罩    diff = cv2.absdiff(img_rgb.astype(np.float32), bg_rgb.astype(np.float32))    alpha_approx = np.clip(diff.mean(axis=2) / 50.001)  # 简化版示意    result = Image.fromarray(img_rgb).convert("RGBA")    result.putalpha(Image.fromarray((alpha_approx * 255).astype(np.uint8)))    result.save(output_path)bg_matting_remove("person.jpg""empty_room.jpg""person_matted.png")

适用场景

  • 专业影视制作、虚拟演播室
  • 固定摄像头场景(如直播带货)
  • RGB-D 摄像头辅助的实时抠像

十、ToonOut(动漫/插画专用)

https://github.com/MatteoKartoon/BiRefNet

介绍

ToonOut 是 BiRefNet 针对动漫和插画风格微调的专用模型。普通抠图模型处理动漫图像时常见的"涂抹头发丝""线条艺术断裂"和"半透明效果丢失"问题,ToonOut 都能完美处理。

它是二次元创作的首选——无论是提取角色立绘、处理漫画扫描件,还是为插画配透明背景,ToonOut 都能保持线条的锐利和色彩的准确。如果你用的是 Stable Diffusion / ComfyUI 工作流,ToonOut 作为抠图预处理步骤可以大幅提升后续效果。

安装

# ToonOut 是 BiRefNet 的衍生,安装方式类似git clone https://github.com/MatteoKartoon/BiRefNet.gitcd BiRefNetpip install -r requirements.txt

代码

# ToonOut 的调用方式与 BiRefNet 相同,区别在于权重文件# 参见第五节 BiRefNet 代码,将 model_type 替换为 "toonout"deftoonout_remove_bg(img_path, output_path):"""ToonOut 动漫图像背景移除"""# 方式一:直接使用 ComfyUI 的 Inspyrenet-Rembg 节点# 方式二:通过 BiRefNet 框架加载 ToonOut 权重from models.birefnet import BiRefNet    model = BiRefNet(bb_pretrained=False)# 加载 ToonOut 专用权重    ckpt = torch.load("toonout_weights.pth", map_location="cpu")    model.load_state_dict(ckpt, strict=True)    model.eval()# 预处理和推理流程与 BiRefNet 相同(见第五节)# ...toonout_remove_bg("anime_art.png""anime_art_transparent.png")

适用场景

  • 动漫角色立绘提取
  • 漫画/插画透明背景输出
  • Stable Diffusion / ComfyUI 工作流的预处理步骤

十一、DeepLabV3+(经典语义分割)

https://github.com/tensorflow/models/tree/master/research/deeplab

介绍

DeepLabV3+ 是谷歌开源的经典语义分割模型,在计算机视觉领域有深远影响。它本身不是专门的抠图模型,而是作为底层的语义分割技术被大量集成在其他模型中。通过 atrous spatial pyramid pooling(ASPP)和解码器结构,DeepLabV3+ 能捕获多尺度的上下文信息。

虽然现在有更新的模型超越了它,但 DeepLabV3+ 仍然是微调自定义抠图任务的一个可靠基座——特别是当你需要用较小的数据集做迁移学习时。

特点

  • 生态成熟:TensorFlow / PyTorch / ONNX 均有实现
  • 可通过微调适配特定抠图场景(如医学图像、卫星图)
  • 社区庞大,文档齐全

十二、DIS(Highly Accurate Dichotomous Image Segmentation)

https://github.com/xuebinqin/DIS

介绍

DIS(二分图像分割)是中科院发布的高精度分割模型,在 DIS5K 数据集上训练,专门针对"物体从背景中分离"这个二分问题做了架构优化。与 U²-Net 相比,DIS 在精细边缘(如毛发、蕾丝、半透明物体)上表现更好。

安装

pip install torch torchvision pillow opencv-python

代码

import torchimport numpy as npfrom PIL import Imagefrom torchvision import transformsmodel = torch.hub.load("xuebinqin/U-2-Net""u2net", pretrained=True)model.eval()defdis_remove_bg(img_path, output_path):    img = Image.open(img_path).convert("RGB")    orig_size = img.size    transform = transforms.Compose([        transforms.Resize((320320)),        transforms.ToTensor(),        transforms.Normalize([0.4850.4560.406], [0.2290.2240.225])    ])    input_tensor = transform(img).unsqueeze(0)with torch.no_grad():        mask = model(input_tensor)[0][00].numpy()    mask = (mask - mask.min()) / (mask.max() - mask.min())    mask_img = Image.fromarray((mask * 255).astype(np.uint8))    mask_img = mask_img.resize(orig_size, Image.LANCZOS)    img.putalpha(mask_img)    img.save(output_path)dis_remove_bg("fine_detail.jpg""fine_detail_bg.png")

适用场景

  • 需要极高边缘精度的图像
  • 婚纱摄影(蕾丝、薄纱半透明材质)
  • 艺术品数字化

十三、选型指南

先看你有什么硬件,再选你能跑什么模型,最后看场景匹配。

按资源(先看硬件)

资源条件
推荐
单张预估(1024px)
高端 GPU ≥8GB
(RTX 3080+)
SAM / BiRefNet / RMBG-2.0 / DIS
<1s
中端 GPU 4-8GB
(RTX 3050/3060)
BiRefNet / RMBG-2.0 / BEN2 / rembg
1-3s
入门 GPU 2-4GB
(GTX 1060+)
rembg / InSPyReNet / MODNet
2-5s
无 GPU(强 CPU)
 8核/16GB
InSPyReNet / rembg(慢)
5-15s
无 GPU(普通电脑)
 4核/8GB
InSPyReNet / MODNet
3-10s
无 GPU(低配笔记本)
 2核/4GB
MODNet(推 512px)
<5s
移动端 / Web
MODNet(ONNX 导出)
<1s
MacBook M1/M2/M3
rembg(CoreML) / InSPyReNet / MODNet
2-5s

按场景(再看用途)

场景
首选
备选
上手最快、通用场景
rembg
InSPyReNet(无 GPU)
人像证件照 / 实时处理
MODNet
PP-Matting(发丝精度优先)
电商商品图、高质量
BRIA RMBG-2.0
BEN2(4K 高清)
复杂场景、需要精确控制
SAM
(带提示点)
BiRefNet(微调)
专业影视 / 固定摄像头
Background Matting
动漫/插画
ToonOut
批量处理 + GPU
rembg 多进程
BiRefNet-lite
无 GPU / CPU 环境
InSPyReNet
MODNet(小模型)
视频抠图
BEN2
MODNet(实时流)
需要微调自有数据
BiRefNet
DeepLabV3+

按场景

| PaddlePaddle 生态 | PP-Matting |


十四、快速上手脚本(rembg 批量处理)

"""批量抠图脚本 —— 一个文件夹全部搞定"""import osfrom pathlib import Pathfrom rembg import removefrom PIL import ImageINPUT_DIR = "./input_photos"OUTPUT_DIR = "./output_photos"Path(OUTPUT_DIR).mkdir(exist_ok=True)for filename in os.listdir(INPUT_DIR):if filename.lower().endswith(('.png''.jpg''.jpeg''.webp')):        input_path = os.path.join(INPUT_DIR, filename)        output_path = os.path.join(OUTPUT_DIR, f"{Path(filename).stem}.png")        img = Image.open(input_path)        result = remove(img)        result.save(output_path)        print(f"✅ {filename} → {output_path}")print(f"\n全部完成!处理了 {len(os.listdir(OUTPUT_DIR))} 张图片。")

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-02 23:30:32 HTTP/2.0 GET : https://f.mffb.com.cn/a/499636.html
  2. 运行时间 : 0.370636s [ 吞吐率:2.70req/s ] 内存消耗:4,672.81kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9844ed652986089b450737a60f4b59e2
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000670s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000878s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.009283s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.009198s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000713s ]
  6. SELECT * FROM `set` [ RunTime:0.000688s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000640s ]
  8. SELECT * FROM `article` WHERE `id` = 499636 LIMIT 1 [ RunTime:0.020671s ]
  9. UPDATE `article` SET `lasttime` = 1783006232 WHERE `id` = 499636 [ RunTime:0.019302s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000287s ]
  11. SELECT * FROM `article` WHERE `id` < 499636 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000544s ]
  12. SELECT * FROM `article` WHERE `id` > 499636 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000452s ]
  13. SELECT * FROM `article` WHERE `id` < 499636 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.061475s ]
  14. SELECT * FROM `article` WHERE `id` < 499636 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.065920s ]
  15. SELECT * FROM `article` WHERE `id` < 499636 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.111353s ]
0.372257s