A
agentscope-ai/agentscope★ 36,989 · Python
以 Python ReAct SDK 和 FastAPI 构建可观测、可中断的智能体
Apache-2.0 · 允许商用v2.0.12
agentscope(智能体与框架)与 pytorch-grad-cam(语音 / 视觉 / 视频生成)跨赛道对比:agentscope-ai/agentscope 在总 Star 规模(★ 37k)与近期 7 日涨星势头上均处于领先;协议方面分别为 Apache-2.0 · 允许商用 与 MIT · 允许商用。
以 Python ReAct SDK 和 FastAPI 构建可观测、可中断的智能体
基于 RepoForAI 每 6 小时独立快照,支持自动适配 GitHub 深浅色主题。
| 评估维度 | agentscope-ai/agentscope | jacobgil/pytorch-grad-cam |
|---|---|---|
| 总 Star 规模 | ★ 36,989 | ★ 13,022 |
| 24h / 7d 增速 | +57 / +314 | +0 / +8 |
| 7 日涨星曲线 | ||
| 工程健康评分 | A+ · 98/100 | A · 79/100 |
| 部署形态标签 | API | GitHub Source |
| 主要语言栈 | Python | Python |
| 商用协议评估 | Apache-2.0 · 允许商用 | MIT · 允许商用 |
| 维护活跃度 | 今天刚更新 | 1 个月前更新 |
| 最新版本 | v2.0.12 | 主分支持续更新 |
| 典型适用场景 | 搭建需要调用工具、实时展示执行进度、人工审批和多租户会话隔离的助手 API | 能访问 PyTorch 模型及其中间层,需要定位视觉或图文模型误判,或系统比较归因算法、目标层和指标 |
uv pip install agentscope
target_layers、reshape_transform 和标量目标函数,将同一套 CAM 流程适配到不同模型与任务。cam.batch_size 控制单批规模。from pytorch_grad_cam import GradCAM, HiResCAM, ScoreCAM, GradCAMPlusPlus, AblationCAM, XGradCAM, EigenCAM, FullGrad from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget from pytorch_grad_cam.utils.image import show_cam_on_image from torchvision.models import resnet50, ResNet50_Weights model = resnet50(weights=ResNet50_Weights.DEFAULT) target_layers = [model.layer4[-1]] input_tensor = # Create an input tensor image for your model.. # Note: input_tensor can be a batch tensor with several images! # We have to specify the target we want to generate the CAM for. targets = [ClassifierOutputTarget(281)] # Construct the CAM object once, and then re-use it on many images. with GradCAM(model=model, target_layers=target_layers) as cam: # You can also pass aug_smooth=True and eigen_smooth=True, to apply smoothing. grayscale_cam = cam(input_tensor=input_tensor, targets=targ