项目记录10---自动添加头注释工具(周任务)

一套完整属于自己的框架正在一步步完成,太好了。
这周任务:
1.搞一套热跟新到框架里面。
2.版本控制。

3.erlang的http实现版本更新。

        下周:

暂时:做一个类似NGUI的图集管理器可以读取TexturePack打包的图集。



/**************************************************


 * 创建人   :XingHua


 * 创建时间 :2015-12-14


 * 模块名字 :AddHeadScriptWin


 * 基本功能 :


************************************************/


using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
using System.Collections.Generic;


public class AddHeadScriptWin : EditorWindow {
public string authorName = "XingHua";
public string ability = "";
public string sciptName = "";
void OnGUI()
{
EditorGUILayout.BeginVertical();
GUIStyle style = new GUIStyle();
style.fontSize = 20;
style.normal.textColor = new Color(2, 0, 0);   //设置字体颜色的
EditorGUILayout.LabelField (new GUIContent ("脚本名称 : " + Selection.activeObject.name),style);
EditorGUILayout.Space ();
EditorGUILayout.Space ();
authorName = EditorGUILayout.TextField("创建人:", authorName);
EditorGUILayout.Space ();
ability = EditorGUILayout.TextField("基本功能:",ability);
EditorGUILayout.EndVertical();


if (GUILayout.Button(new GUIContent("Add"), GUILayout.Width(50), GUILayout.Height(50))) {
Object obj = Selection.activeObject;


string filePath =  AssetDatabase.GetAssetPath(obj);


if(!File.Exists(filePath))
return;
FileStream file = File.Open(filePath, FileMode.Open);
StreamReader fileReader = new StreamReader(file);


List<string> listStr = new List<string>();
string strLine = fileReader.ReadLine();
while (strLine != null)
{
//Debug.Log(strLine);
listStr.Add(strLine);
strLine = fileReader.ReadLine();
}
fileReader.Close();


if(listStr.Contains("/**************************************************"))
return;


string filePathAndName = filePath.Substring(0,filePath.LastIndexOf('/')+1)+ obj.name+".cs";
//如果文件存在就删除
if (File.Exists(filePath))
{
File.Delete(filePath);
}
StreamWriter streamWriter = File.CreateText(filePathAndName);
// 注释部分
streamWriter.WriteLine("/**************************************************");
streamWriter.WriteLine("\n * 创建人   :" + authorName);
streamWriter.WriteLine("\n * 创建时间 :" + System.DateTime.Now.Year + "-" + System.DateTime.Now.Month + "-" + System.DateTime.Now.Day);
streamWriter.WriteLine("\n * 模块名字 :" + obj.name);
streamWriter.WriteLine("\n * 基本功能 :" + ability);
streamWriter.WriteLine("\n************************************************/");
streamWriter.WriteLine("");
for(int i = 0 ; i <listStr.Count ; i++)
{
streamWriter.WriteLine(listStr[i]);
}
streamWriter.Close();
AssetDatabase.Refresh();
}
}
}


火灾烟雾与人员检测数据集一、基础信息• 数据集名称:火灾烟雾与人员检测数据集• 图片数量:训练集:198张测试集:2张总计:200张• 训练集:198张• 测试集:2张• 总计:200张• 分类类别:fire(火焰):明火区域检测human(人员):现场人员定位smoke(烟雾):烟雾扩散区域识别• fire(火焰):明火区域检测• human(人员):现场人员定位• smoke(烟雾):烟雾扩散区域识别• 标注格式:YOLO格式(包含归一化中心坐标、宽高及类别标签)• 数据特性:覆盖室内外火灾场景,包含火焰、烟雾与人员的多目标共存实例二、适用场景1. 智能安防监控系统:集成至公共区域监控网络,实时检测火焰与烟雾并定位受困人员,提升应急响应速度。1. 森林火灾预警平台:用于无人机巡检影像分析,自动识别早期火源与烟雾扩散趋势,辅助森林防火决策。1. 工业安全检测:应用于化工厂、仓库等高风险场所,监控作业区域内异常火源与人员安全状态。1. 消防救援辅助系统:为消防机器人提供视觉感知能力,在复杂环境中精准定位火源与被困人员位置。三、数据集优势• 多目标协同标注:同步标注火焰、烟雾、人员三类关键目标,完整还原火灾现场要素关联性,支持复杂场景理解。• 真实场景覆盖:数据源自实际火灾监控场景,包含不同规模火势(局部明火/大面积燃烧)、烟雾浓度(薄雾/浓烟)及人员姿态(站立/匍匐)。• 高兼容任务适配:YOLO格式标注可直接应用于目标检测模型训练(如YOLOv5/v7),并扩展至人员行为分析、火势蔓延预测等衍生任务。• 安防价值突出:聚焦火灾初期特征识别与人员定位,为安防系统提供「火--人」三位一体检测能力,助力灾前预警与灾中救援。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值