{"id":13958509,"url":"https://github.com/zhengqi98/Hefei_ECG_TOP1","last_synced_at":"2025-07-21T00:31:09.079Z","repository":{"id":40682173,"uuid":"229397883","full_name":"zhengqi98/Hefei_ECG_TOP1","owner":"zhengqi98","description":"“合肥高新杯”心电人机智能大赛 —— 心电异常事件预测 TOP1 Solution","archived":false,"fork":false,"pushed_at":"2021-04-27T12:53:12.000Z","size":2726,"stargazers_count":145,"open_issues_count":6,"forks_count":39,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-28T02:34:47.776Z","etag":null,"topics":["competition","data-mining","deep-learning","ecg","ecg-classification","multi-lead"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhengqi98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-21T08:14:42.000Z","updated_at":"2024-06-28T17:05:42.000Z","dependencies_parsed_at":"2022-08-25T05:20:31.301Z","dependency_job_id":null,"html_url":"https://github.com/zhengqi98/Hefei_ECG_TOP1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhengqi98/Hefei_ECG_TOP1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengqi98%2FHefei_ECG_TOP1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengqi98%2FHefei_ECG_TOP1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengqi98%2FHefei_ECG_TOP1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengqi98%2FHefei_ECG_TOP1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhengqi98","download_url":"https://codeload.github.com/zhengqi98/Hefei_ECG_TOP1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengqi98%2FHefei_ECG_TOP1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266221257,"owners_count":23894965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["competition","data-mining","deep-learning","ecg","ecg-classification","multi-lead"],"created_at":"2024-08-08T13:01:40.759Z","updated_at":"2025-07-21T00:31:08.456Z","avatar_url":"https://github.com/zhengqi98.png","language":"Python","funding_links":[],"categories":["时间序列"],"sub_categories":["网络服务_其他"],"readme":"## “合肥高新杯”心电人机智能大赛——心电异常事件预测冠军解决方案\n### 赛题地址\nhttps://tianchi.aliyun.com/competition/entrance/231754/introduction  \n### 开源baseline\n感谢比赛期间JavisPeng开源的优质[baseline](https://github.com/JavisPeng/ecg_pytorch)\n### 比赛分数\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/rank.png\"\u003e\n\u003c/p\u003e\n\n### 赛题回顾\n- 问题描述：依据心电图机8导联的数据和年龄、性别特征，预测心电异常事件\n- 比赛数据：32142条初赛数据和20036条复赛数据（初赛数据有重复，初复赛标签分布差异大）\n- 评价指标：MicroF1\n### 数据分析\n- 标签相关性：计算公式为两标签交集数量除以两标签并集数量，0表示完全互斥。该相关性也可视为一种“特征”。\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/corr.png\"\u003e\n\u003c/p\u003e\n\n- 不同导联节拍一致：尖峰位置一致。\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/8lead1.png\"\u003e\n\u003c/p\u003e\n\n- 不同导联十分相似：将不同导联画在同一坐标轴上，可看出**相似性**。如何构建模型以利用这种**相似性**是**最为关键**的思路。\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/8lead2.png\"\u003e\n\u003c/p\u003e\n\n### 模型构建\n针对多导联心电图分类任务，我创新地提出一种网络结构，将其称之为**ECGNet: Multi-scale ResNet for Multi-lead ECG Data**。该模型是本次比赛的**致胜关键**。（细节可见PPT）\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/ECGNet.png\"\u003e\n\u003c/p\u003e\n\n### 模型融合\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/stacking.png\"\u003e\n\u003c/p\u003e\n\n模型融合阶段效果提升，我认为主要有两点原因：\n  1. 充分利用初赛和复赛的数据\n  2. “隐含”地利用了不同标签的相关性 \n  \n不足之处：\n  1. 模型缺乏多样性\n  2. 没有用到传统特征和树模型   \n  \n此外，植物提出的[嫁接学习](https://github.com/plantsgo/ijcai-2018)也是种很有意思的思路。\n\n### 效果评估\n线下对20类标签用单模型评估效果，反正比我自己判断的（仅限电轴偏转方向）好得多。\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"image/eval.png\"\u003e\n\u003c/p\u003e\n\n### 经验总结\n- 充分利用提供的数据很重要，尤其分布差异很大时。\n- 多去思考多去尝试。\n\n在处理多导联心电图数据时： \n- 对不同导联应用相同的卷积核，能在减小参数量的同时，很好地提升模型的效果。\n- 采用多尺度网络能捕捉不同尺度的特征，较好地提升模型的效果。\n- 网络初期可以采用较大的卷积核，后期可以采用较小的卷积核。\n- BN-ReLU-Conv要优于Conv-BN-ReLU。\n- Squeeze-and-excitation结构也能提升模型的效果。\n- 传统特征也很重要。\n\n### 失败尝试\n以下是一些失败的尝试（不代表这些方法真的不行，也许是我的打开方式有问题）：\n- 傅里叶变换\n- 小波变换\n- 频谱图\n- DenseNet\n- EfficientNet\n- Attention\n- LSTM\n- 滑动窗口\n- 去噪\n- 特征工程\n\n总之还是要多思考多去尝试吧，没有什么事能一帆风顺的。\n\n### 赛后感想\n本次比赛收获颇丰，除了实质性奖励以外，还锻炼了我赛题思考、数据分析、模型构建、论文阅读、编程实现以及答辩的能力，且与其他选手交流了一些有趣的思路。  \n客观上来看，本次比赛有很大的运气成分的，自己还有很多不足。总之，继续努力，再接再厉吧。  \n~~单人参赛好累啊，还有复现阶段需要抓紧时间，我差点没在期限内整出来。~~\n\n### PS\n很多细节我没有详细介绍，有兴趣地可以看PPT或答辩视频。\n\n### 答辩视频\nhttps://tianchi.aliyun.com/course/video?liveId=41127\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengqi98%2FHefei_ECG_TOP1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhengqi98%2FHefei_ECG_TOP1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengqi98%2FHefei_ECG_TOP1/lists"}