开发者实战用Face Analysis WebUI API集成自动化人脸分析系统1. 从界面点击到API调用为什么需要自动化集成1.1 手动操作的瓶颈与自动化需求当你通过浏览器界面使用Face Analysis WebUI时整个过程是直观且友好的上传图片、勾选选项、点击分析、查看结果。这种交互方式非常适合单次、探索性的使用场景。然而在实际的工程项目中我们常常面临不同的需求批量处理需求需要分析成百上千张图片不可能一张张手动上传系统集成需求需要将人脸分析功能嵌入到现有的考勤系统、安防平台或用户画像工具中实时处理需求需要对视频流或摄像头画面进行实时人脸属性分析数据流水线需求需要将分析结果自动存储到数据库或推送到其他系统这些场景下手动操作界面就显得力不从心了。这正是API的价值所在——它让机器与机器对话让功能与系统无缝对接。1.2 API集成的核心优势通过API集成Face Analysis WebUI你将获得三个关键优势效率提升从分钟级的手动操作变为秒级的自动处理处理100张图片的时间从几十分钟缩短到几分钟。一致性保证API调用确保每次分析使用相同的参数和流程避免了人工操作可能带来的误差。可扩展性API可以轻松集成到各种编程语言和框架中无论是Python脚本、Java后端、Node.js服务还是移动应用。更重要的是你不需要重新训练模型或搭建复杂的环境——镜像已经为你准备好了完整的分析引擎你只需要学会如何与它对话。2. 深入理解Face Analysis WebUI的API架构2.1 服务架构概览在开始编写代码之前让我们先理解Face Analysis WebUI背后的技术架构。当你启动镜像时实际上启动了两个核心组件Gradio Web服务器这是你看到的浏览器界面的后端它基于FastAPI构建提供了RESTful API接口。InsightFace分析引擎这是实际执行人脸检测、关键点定位、属性预测的核心模块基于PyTorch和ONNX Runtime运行。这两个组件通过内部接口连接而API就是你与这个系统通信的桥梁。理解这个架构有助于你更好地调试和优化集成方案。2.2 API端点详解Face Analysis WebUI提供了多个API端点每个端点对应不同的功能/api/analyze核心分析接口接收图片并返回完整的人脸分析结果/api/health健康检查接口用于监控服务状态/api/config配置查询接口获取当前服务参数对于大多数集成场景你主要会使用/api/analyze端点。这个端点支持两种调用方式同步调用发送请求后等待分析完成获取完整结果。适合单张图片或小批量处理。异步调用发送请求后立即返回任务ID通过轮询获取结果。适合大批量或长时间处理。在本文中我们将重点介绍同步调用因为它更简单直观能满足大部分开发需求。3. 实战开始基础API调用与结果解析3.1 环境准备与基础测试在开始编写集成代码之前确保你的Face Analysis WebUI服务已经正常运行。通过以下命令启动服务bash /root/build/start.sh服务启动后默认监听在http://localhost:7860。你可以先通过浏览器访问这个地址确认Web界面正常工作。接下来让我们用最简单的Python脚本测试API连通性import requests import json # 基础健康检查 def test_health(): url http://localhost:7860/api/health try: response requests.get(url, timeout5) if response.status_code 200: print(✅ 服务健康状态正常) print(f响应内容: {response.json()}) return True else: print(f❌ 服务异常状态码: {response.status_code}) return False except requests.exceptions.ConnectionError: print(❌ 无法连接到服务请检查服务是否启动) return False except Exception as e: print(f❌ 未知错误: {e}) return False if __name__ __main__: test_health()运行这个脚本如果看到服务健康状态正常的输出说明API服务已经就绪。3.2 单张图片分析完整流程示例现在让我们实现一个完整的图片分析函数。这个函数将演示如何上传图片、调用API、解析结果import requests import cv2 import numpy as np from PIL import Image import io import time class FaceAnalysisClient: def __init__(self, base_urlhttp://localhost:7860): self.base_url base_url self.analyze_url f{base_url}/api/analyze def analyze_image_file(self, image_path, draw_optionsNone): 分析本地图片文件 参数: image_path: 图片文件路径 draw_options: 可选绘制选项字典 例如: {draw_bbox: True, draw_landmarks: True} 返回: 分析结果字典 # 准备请求数据 files {image: open(image_path, rb)} data {} if draw_options: # 将绘制选项转换为API期望的格式 for key, value in draw_options.items(): data[key] str(value).lower() # 发送请求 start_time time.time() response requests.post(self.analyze_url, filesfiles, datadata) elapsed_time time.time() - start_time # 检查响应 if response.status_code ! 200: raise Exception(fAPI调用失败: {response.status_code} - {response.text}) result response.json() # 添加处理时间信息 result[processing_time] round(elapsed_time, 3) return result def analyze_image_numpy(self, image_array): 分析numpy数组格式的图片 参数: image_array: numpy数组形状为(H, W, C)BGR格式 返回: 分析结果字典 # 将numpy数组转换为字节流 _, buffer cv2.imencode(.jpg, image_array) image_bytes io.BytesIO(buffer) files {image: (image.jpg, image_bytes, image/jpeg)} response requests.post(self.analyze_url, filesfiles) if response.status_code ! 200: raise Exception(fAPI调用失败: {response.status_code}) return response.json() def print_results(self, result): 格式化打印分析结果 if result.get(status) ! success: print(f分析失败: {result.get(message, 未知错误)}) return faces result.get(faces, []) print(f 检测到 {len(faces)} 张人脸) print(f⏱️ 处理时间: {result.get(processing_time, N/A)}秒) print(- * 50) for i, face in enumerate(faces, 1): print(f\n 人脸 #{i}:) print(f 位置: {face.get(bbox, N/A)}) print(f 年龄: {face.get(age, N/A)}岁) print(f 性别: {face.get(gender, N/A)}) print(f 置信度: {face.get(confidence, 0)*100:.1f}%) # 关键点信息 landmarks face.get(landmarks_106, []) if landmarks: print(f 关键点: 检测到{len(landmarks)}个点) # 姿态信息 pose face.get(pose_3d, {}) if pose: pitch pose.get(pitch, 0) yaw pose.get(yaw, 0) roll pose.get(roll, 0) # 转换为友好描述 pitch_desc 平视 if abs(pitch) 5 else (抬头 if pitch 0 else 低头) yaw_desc 正面 if abs(yaw) 10 else (右转 if yaw 0 else 左转) roll_desc 水平 if abs(roll) 5 else (右倾 if roll 0 else 左倾) print(f 头部姿态: {pitch_desc}({pitch:.1f}°), {yaw_desc}({abs(yaw):.1f}°), {roll_desc}({abs(roll):.1f}°)) # 使用示例 if __name__ __main__: # 创建客户端 client FaceAnalysisClient() # 分析单张图片 try: result client.analyze_image_file(test_photo.jpg) client.print_results(result) except FileNotFoundError: print(⚠️ 请先准备测试图片 test_photo.jpg) except Exception as e: print(f❌ 分析失败: {e})这个类提供了完整的API封装你可以直接在自己的项目中使用。4. 进阶集成实际应用场景与优化策略4.1 场景一批量图片处理系统在实际项目中你经常需要处理整个文件夹的图片。下面是一个批量处理的完整示例import os import json from concurrent.futures import ThreadPoolExecutor, as_completed from tqdm import tqdm class BatchFaceAnalyzer: def __init__(self, api_urlhttp://localhost:7860, max_workers4): self.client FaceAnalysisClient(api_url) self.max_workers max_workers def analyze_directory(self, input_dir, output_fileNone, image_extensions(.jpg, .jpeg, .png, .bmp)): 分析目录中的所有图片 参数: input_dir: 输入目录路径 output_file: 输出JSON文件路径可选 image_extensions: 支持的图片扩展名 返回: 所有图片的分析结果字典 # 收集所有图片文件 image_files [] for root, _, files in os.walk(input_dir): for file in files: if file.lower().endswith(image_extensions): image_files.append(os.path.join(root, file)) if not image_files: print(f⚠️ 在目录 {input_dir} 中未找到图片文件) return {} print(f 找到 {len(image_files)} 张图片) # 使用线程池并行处理 all_results {} with ThreadPoolExecutor(max_workersself.max_workers) as executor: # 提交所有任务 future_to_file { executor.submit(self._analyze_single, img_file): img_file for img_file in image_files } # 处理完成的任务 with tqdm(totallen(image_files), desc分析进度) as pbar: for future in as_completed(future_to_file): img_file future_to_file[future] try: result future.result() all_results[img_file] result except Exception as e: all_results[img_file] { status: error, error: str(e) } pbar.update(1) # 保存结果到文件 if output_file: with open(output_file, w, encodingutf-8) as f: json.dump(all_results, f, ensure_asciiFalse, indent2) print(f 结果已保存到: {output_file}) # 生成统计信息 self._generate_statistics(all_results) return all_results def _analyze_single(self, image_path): 分析单张图片内部方法 try: result self.client.analyze_image_file(image_path) result[file_path] image_path return result except Exception as e: return { status: error, file_path: image_path, error: str(e) } def _generate_statistics(self, results): 生成统计信息 total_files len(results) success_files sum(1 for r in results.values() if r.get(status) success) error_files total_files - success_files total_faces 0 age_sum 0 age_count 0 gender_counts {Male: 0, Female: 0} for result in results.values(): if result.get(status) success: faces result.get(faces, []) total_faces len(faces) for face in faces: age face.get(age) if age: age_sum age age_count 1 gender face.get(gender) if gender in gender_counts: gender_counts[gender] 1 print(\n 批量分析统计:) print(f 处理文件数: {total_files}) print(f 成功分析: {success_files}) print(f 失败文件: {error_files}) print(f 检测到总人脸数: {total_faces}) if age_count 0: print(f 平均年龄: {age_sum/age_count:.1f}岁) print(f 性别分布: 男性{gender_counts[Male]}人, 女性{gender_counts[Female]}人) # 使用示例 if __name__ __main__: analyzer BatchFaceAnalyzer(max_workers2) # 根据CPU核心数调整 # 分析整个目录 results analyzer.analyze_directory( input_dir./photos, output_file./analysis_results.json )这个批量处理器支持并行处理、进度显示、错误处理和结果统计非常适合处理大量图片。4.2 场景二实时视频流分析对于安防监控或实时分析场景你需要处理视频流。下面是一个视频流分析的示例import cv2 import threading import queue import time class VideoFaceAnalyzer: def __init__(self, api_urlhttp://localhost:7860, frame_skip5, max_queue_size10): 视频流人脸分析器 参数: api_url: API地址 frame_skip: 跳帧数每N帧分析一次 max_queue_size: 分析队列最大长度 self.client FaceAnalysisClient(api_url) self.frame_skip frame_skip self.analysis_queue queue.Queue(maxsizemax_queue_size) self.results_queue queue.Queue() self.running False def start_analysis_thread(self): 启动分析线程 self.running True self.analysis_thread threading.Thread(targetself._analysis_worker) self.analysis_thread.daemon True self.analysis_thread.start() def stop_analysis(self): 停止分析 self.running False if hasattr(self, analysis_thread): self.analysis_thread.join(timeout2) def _analysis_worker(self): 分析工作线程 while self.running: try: # 从队列获取帧最多等待1秒 frame_data self.analysis_queue.get(timeout1) frame, frame_id frame_data try: # 分析当前帧 result self.client.analyze_image_numpy(frame) result[frame_id] frame_id result[timestamp] time.time() # 将结果放入结果队列 self.results_queue.put(result) except Exception as e: print(f分析帧 {frame_id} 时出错: {e}) finally: self.analysis_queue.task_done() except queue.Empty: continue except Exception as e: print(f分析线程错误: {e}) def process_video(self, video_source0, displayTrue): 处理视频流 参数: video_source: 视频源0摄像头或视频文件路径 display: 是否显示实时画面 # 打开视频源 cap cv2.VideoCapture(video_source) if not cap.isOpened(): print(f❌ 无法打开视频源: {video_source}) return # 启动分析线程 self.start_analysis_thread() frame_count 0 last_results None print( 开始视频分析 (按q退出)...) try: while True: ret, frame cap.read() if not ret: break frame_count 1 # 跳帧处理 if frame_count % self.frame_skip ! 0: continue # 复制帧用于显示 display_frame frame.copy() # 将帧放入分析队列 if self.analysis_queue.qsize() self.analysis_queue.maxsize: self.analysis_queue.put((frame, frame_count)) # 获取最新分析结果 try: last_results self.results_queue.get_nowait() self._draw_results(display_frame, last_results) except queue.Empty: pass # 显示画面 if display: cv2.imshow(Face Analysis, display_frame) # 按q退出 if cv2.waitKey(1) 0xFF ord(q): break # 控制处理速度 time.sleep(0.01) finally: # 清理资源 self.stop_analysis() cap.release() if display: cv2.destroyAllWindows() def _draw_results(self, frame, results): 在帧上绘制分析结果 if results.get(status) ! success: return faces results.get(faces, []) for face in faces: # 获取边界框 bbox face.get(bbox) if not bbox or len(bbox) 4: continue x1, y1, x2, y2 map(int, bbox[:4]) # 绘制边界框 cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), 2) # 绘制年龄和性别 age face.get(age, N/A) gender face.get(gender, N/A) label f{gender} {age} # 计算文本位置 text_y y1 - 10 if y1 20 else y1 20 cv2.putText(frame, label, (x1, text_y), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 2) # 绘制关键点可选 landmarks face.get(landmarks_106, []) for landmark in landmarks: if len(landmark) 2: x, y int(landmark[0]), int(landmark[1]) cv2.circle(frame, (x, y), 2, (0, 0, 255), -1) # 使用示例 if __name__ __main__: analyzer VideoFaceAnalyzer(frame_skip10) # 每10帧分析一次 # 使用摄像头 analyzer.process_video(video_source0, displayTrue) # 或使用视频文件 # analyzer.process_video(video_sourcetest_video.mp4, displayTrue)这个视频分析器实现了生产者-消费者模式分析线程独立运行不会阻塞视频捕获确保了实时性。4.3 场景三Web应用后端集成如果你正在开发一个Web应用需要将人脸分析功能集成到后端服务中下面是一个Flask应用的示例from flask import Flask, request, jsonify, send_file import requests from io import BytesIO from PIL import Image import base64 import uuid import os app Flask(__name__) # 配置 FACE_ANALYSIS_API http://localhost:7860/api/analyze UPLOAD_FOLDER ./uploads RESULTS_FOLDER ./results os.makedirs(UPLOAD_FOLDER, exist_okTrue) os.makedirs(RESULTS_FOLDER, exist_okTrue) app.route(/api/analyze, methods[POST]) def analyze_image(): 分析图片API端点 try: # 检查是否有文件上传 if image not in request.files: return jsonify({ status: error, message: 没有上传图片文件 }), 400 file request.files[image] # 检查文件名 if file.filename : return jsonify({ status: error, message: 没有选择文件 }), 400 # 生成唯一文件名 file_id str(uuid.uuid4()) original_path os.path.join(UPLOAD_FOLDER, f{file_id}_original.jpg) result_path os.path.join(RESULTS_FOLDER, f{file_id}_result.jpg) # 保存原始文件 file.save(original_path) # 获取分析选项 draw_options {} for option in [draw_bbox, draw_landmarks, draw_pose, show_age_gender]: if request.form.get(option): draw_options[option] request.form.get(option) true # 调用Face Analysis API with open(original_path, rb) as f: files {image: f} response requests.post(FACE_ANALYSIS_API, filesfiles, datadraw_options) if response.status_code ! 200: return jsonify({ status: error, message: f人脸分析服务错误: {response.text} }), 500 result response.json() # 保存结果图片如果有 if result_image in request.form and request.form[result_image] true: # 这里可以添加绘制结果图片的逻辑 # 暂时返回原始结果 pass # 添加文件信息 result[file_id] file_id result[original_path] original_path return jsonify(result) except Exception as e: return jsonify({ status: error, message: f处理失败: {str(e)} }), 500 app.route(/api/analyze_base64, methods[POST]) def analyze_image_base64(): 分析Base64编码的图片 try: data request.json if not data or image not in data: return jsonify({ status: error, message: 没有提供图片数据 }), 400 # 解码Base64图片 image_data base64.b64decode(data[image].split(,)[1] if , in data[image] else data[image]) image Image.open(BytesIO(image_data)) # 转换为JPEG字节流 img_byte_arr BytesIO() image.save(img_byte_arr, formatJPEG) img_byte_arr.seek(0) # 调用Face Analysis API files {image: (image.jpg, img_byte_arr, image/jpeg)} response requests.post(FACE_ANALYSIS_API, filesfiles) if response.status_code ! 200: return jsonify({ status: error, message: f人脸分析服务错误: {response.text} }), 500 return jsonify(response.json()) except Exception as e: return jsonify({ status: error, message: f处理失败: {str(e)} }), 500 app.route(/api/batch_analyze, methods[POST]) def batch_analyze(): 批量分析图片 try: if images not in request.files: return jsonify({ status: error, message: 没有上传图片文件 }), 400 files request.files.getlist(images) if len(files) 20: # 限制批量数量 return jsonify({ status: error, message: 一次最多上传20张图片 }), 400 results [] for file in files: if file.filename : continue # 临时保存文件 temp_path os.path.join(UPLOAD_FOLDER, ftemp_{uuid.uuid4()}.jpg) file.save(temp_path) # 调用分析API with open(temp_path, rb) as f: api_files {image: f} response requests.post(FACE_ANALYSIS_API, filesapi_files) if response.status_code 200: result response.json() result[filename] file.filename results.append(result) # 删除临时文件 os.remove(temp_path) return jsonify({ status: success, total: len(files), successful: len(results), results: results }) except Exception as e: return jsonify({ status: error, message: f批量处理失败: {str(e)} }), 500 app.route(/api/stats, methods[GET]) def get_stats(): 获取服务统计信息 try: # 这里可以添加自定义的统计逻辑 # 例如分析次数、平均处理时间等 return jsonify({ status: success, stats: { service: Face Analysis API Gateway, version: 1.0.0, endpoints: [ /api/analyze, /api/analyze_base64, /api/batch_analyze, /api/stats ] } }) except Exception as e: return jsonify({ status: error, message: f获取统计失败: {str(e)} }), 500 if __name__ __main__: app.run(host0.0.0.0, port5000, debugTrue)这个Flask应用提供了完整的RESTful API可以作为你现有系统的中间层处理文件上传、格式转换、批量处理等任务。5. 性能优化与错误处理5.1 性能优化策略当处理大量图片或需要低延迟时性能优化变得很重要。以下是一些实用的优化策略连接池管理重用HTTP连接避免每次请求都建立新连接。import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry class OptimizedFaceAnalysisClient(FaceAnalysisClient): def __init__(self, base_urlhttp://localhost:7860, max_retries3): super().__init__(base_url) # 创建带重试机制的会话 self.session requests.Session() retry_strategy Retry( totalmax_retries, backoff_factor1, status_forcelist[429, 500, 502, 503, 504] ) adapter HTTPAdapter(max_retriesretry_strategy, pool_connections10, pool_maxsize100) self.session.mount(http://, adapter) self.session.mount(https://, adapter) def analyze_image_file(self, image_path, draw_optionsNone): 使用连接池优化的分析方法 files {image: open(image_path, rb)} data draw_options or {} # 使用会话而不是requests.post response self.session.post(self.analyze_url, filesfiles, datadata, timeout30) # ... 其余代码相同图片预处理在上传前压缩图片减少传输时间。def compress_image(image_path, max_size(1024, 1024), quality85): 压缩图片以减少传输大小 from PIL import Image import io img Image.open(image_path) # 调整尺寸 img.thumbnail(max_size, Image.Resampling.LANCZOS) # 转换为JPEG字节流 img_byte_arr io.BytesIO() img.save(img_byte_arr, formatJPEG, qualityquality, optimizeTrue) img_byte_arr.seek(0) return img_byte_arr # 使用压缩后的图片 compressed_image compress_image(large_photo.jpg, max_size(800, 800)) files {image: (compressed.jpg, compressed_image, image/jpeg)}批量请求优化对于大量图片可以考虑分批处理避免内存溢出。def batch_process_optimized(image_paths, batch_size10, delay0.1): 优化的批量处理控制内存使用 results [] for i in range(0, len(image_paths), batch_size): batch image_paths[i:ibatch_size] batch_results [] # 处理当前批次 with ThreadPoolExecutor(max_workersmin(batch_size, 4)) as executor: future_to_path { executor.submit(analyze_single, path): path for path in batch } for future in as_completed(future_to_path): try: result future.result() batch_results.append(result) except Exception as e: print(f处理失败: {e}) results.extend(batch_results) # 批次间延迟避免过热 time.sleep(delay) return results5.2 错误处理与重试机制健壮的系统需要完善的错误处理。以下是一个带有重试和降级策略的客户端import time from functools import wraps def retry_on_failure(max_retries3, delay1, backoff2): 重试装饰器 def decorator(func): wraps(func) def wrapper(*args, **kwargs): last_exception None for attempt in range(max_retries): try: return func(*args, **kwargs) except Exception as e: last_exception e if attempt max_retries - 1: wait_time delay * (backoff ** attempt) print(f尝试 {func.__name__} 失败{wait_time}秒后重试... (尝试 {attempt 1}/{max_retries})) time.sleep(wait_time) else: print(f所有重试失败: {e}) raise last_exception return wrapper return decorator class RobustFaceAnalysisClient(FaceAnalysisClient): def __init__(self, base_urlhttp://localhost:7860): super().__init__(base_url) self.session requests.Session() retry_on_failure(max_retries3, delay1, backoff2) def analyze_with_retry(self, image_path, draw_optionsNone): 带重试的分析方法 return self.analyze_image_file(image_path, draw_options) def analyze_with_fallback(self, image_path, draw_optionsNone): 带降级策略的分析 try: # 首先尝试完整分析 return self.analyze_with_retry(image_path, draw_options) except Exception as e: print(f完整分析失败尝试降级分析: {e}) # 降级只进行基本的人脸检测 try: return self._basic_face_detection(image_path) except Exception as e2: print(f降级分析也失败: {e2}) raise def _basic_face_detection(self, image_path): 基本人脸检测降级方案 # 这里可以实现一个简化版本的人脸检测 # 例如使用OpenCV的Haar Cascade import cv2 # 加载预训练的人脸检测器 face_cascade cv2.CascadeClassifier( cv2.data.haarcascades haarcascade_frontalface_default.xml ) # 读取图片 img cv2.imread(image_path) gray cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # 检测人脸 faces face_cascade.detectMultiScale( gray, scaleFactor1.1, minNeighbors5, minSize(30, 30) ) # 构建简化结果 result { status: success, faces: [], processing_time: 0.1, fallback: True # 标记为降级结果 } for i, (x, y, w, h) in enumerate(faces): result[faces].append({ id: i 1, bbox: [float(x), float(y), float(x w), float(y h)], age: None, gender: None, confidence: 0.7, # 估计值 landmarks_106: [], pose_3d: {} }) return result6. 总结6.1 核心要点回顾通过本文的实战指南你已经掌握了将Face Analysis WebUI从手动工具转变为自动化系统的完整方法。让我们回顾一下关键收获API集成的核心价值在于将一次性的人工操作转变为可编程、可扩展、可集成的自动化流程。你不再需要手动上传每张图片而是可以通过代码批量处理成千上万的图片或者将人脸分析功能无缝嵌入到你的现有系统中。技术实现的层次从简单到复杂从最基本的单张图片分析到批量处理系统再到实时视频流分析和Web应用集成。每个层次都解决了不同的实际问题你可以根据具体需求选择合适的方案。性能优化与健壮性是生产环境集成的关键。通过连接池管理、图片预处理、错误重试和降级策略你可以确保系统在面对各种异常情况时仍能稳定运行。6.2 下一步探索方向掌握了基础集成后你可以考虑以下进阶方向多服务负载均衡当单实例无法满足高并发需求时可以部署多个Face Analysis WebUI实例通过负载均衡器分发请求。结果持久化与查询将分析结果存储到数据库如MySQL、MongoDB并构建查询接口实现历史数据的检索和分析。自定义模型集成如果你有特定领域的人脸分析需求可以训练自定义模型并替换或扩展现有的InsightFace模型。边缘设备部署将分析服务部署到边缘设备如Jetson Nano、树莓派等实现本地化、低延迟的人脸分析。与其他AI服务集成将人脸分析结果作为输入结合其他AI服务如情感分析、行为识别等构建更复杂的智能应用。技术的真正价值在于解决实际问题。现在你已经拥有了将先进的人脸分析能力集成到任何项目中的工具和知识。接下来要做的就是找到那些需要这项技术的场景并开始构建。获取更多AI镜像想探索更多AI镜像和应用场景访问 CSDN星图镜像广场提供丰富的预置镜像覆盖大模型推理、图像生成、视频生成、模型微调等多个领域支持一键部署。