Repository navigation
新增语义类别实时计数功能(行人/车辆/交通灯),右上角可视化计数面板,基于像素阈值估算目标数量 - #4003
Merged
Merged
Conversation
donghaiwang
approved these changes
Dec 20, 2025
sda-57
pushed a commit
to sda-57/nn
that referenced
this pull request
Dec 21, 2025
* 无人车的深度语义分割 * 更新感知模块README并添加传感器环境脚本 * 加载Town05地图,定位Model3并切换至后上方追尾视角,获取全地图合法生成点 * 加载Town05地图,定位Model3并切换至后上方追尾视角,获取全地图合法生成点 * 删除远程仓库中的carlaCNN.ipynb文件(本地已删除,同步至远程) * 删除远程仓库中的carlaCNN.py文件(本地已删除,同步至远程) * 新增carla_model3_spawn_with_spectator.py:加载Town05生成Model3并设置追尾视角 * 为carla_model3_spawn_with_spectator.py新增NPC交通流:生成200辆NPC并启动自动驾驶。 * 新增核心功能:主角车沿车道稳定自动驾驶+视角平滑跟随,NPC交通流自动驾驶 * 核心优化:基于CARLA强同步模式解决镜头抖动,绑定视角与车辆状态到同一帧 * 新增核心功能:实时RGB摄像头画面采集+OpenCV显示 * 新增核心功能:语义分割摄像头(Cityscapes调色板可视化),整合RGB双摄像头+强同步无抖动视角 * 新增核心功能:RGB与语义分割图像横向拼接显示,单窗口对比 * 新增核心功能:自主行走行人,整合车辆+行人+RGB+语义分割拼接显示,全场景同步 * 删除src/carla_autonomous_driving文件夹 * feat(monitor): 新增实时性能监控可视化,显示FPS/队列长度/同步帧号,优化文本布局避免重叠 * feat(view): 新增前视+俯视多视角可视化,重构摄像头通用初始化函数修复属性兼容问题 * feat(heatmap): 新增行人+车辆语义密度热力图,优化为2×2四视图布局(前视RGB+语义/俯视RGB+热力图) * feat(count): 新增语义类别实时计数功能(行人/车辆/交通灯),右上角可视化计数面板,基于像素阈值估算目标数量
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改概述:
新增行人/车辆/交通灯语义类别实时计数功能,右上角添加可视化计数面板,基于像素阈值估算画面内目标数量,保留所有原有功能(热力图/多视角/性能监控)
修改的详细描述
核心新增:语义类别实时计数(feat(count))
计数逻辑:
统计指定类别(行人4/车辆10/交通灯12)的像素总数;
按经验阈值估算目标数量(行人≈200像素/个,车辆≈500像素/个,交通灯≈50像素/个);
阈值适配1024×720分辨率+90°FOV,可根据场景调整;
避免0除异常,像素数不足阈值时计为0。
复用性:支持自定义类别映射字典,可快速扩展到道路/建筑等其他语义类别。
经过了什么样的测试?
测试环境:
操作系统:Windows 11;
Python版本:3.7.5;
CARLA版本:0.9.15;
核心验证项:
计数准确性:画面内行人/车辆/交通灯数量与实际场景匹配(误差±1);
可视化:计数面板位置合理,字体清晰,无重叠/遮挡;
性能:FPS稳定30,无卡顿/丢帧;
兼容性:所有原有功能(热力图/多视角/性能监控)正常运行。
运行效果动图、视频、截图等
2025-12-19.172618.-.Trim.-.Trim.mp4