# 基于高分辨率遥感可见光数据的细粒度密集船只目标检测任务 **Repository Path**: mlcncs/ship ## Basic Information - **Project Name**: 基于高分辨率遥感可见光数据的细粒度密集船只目标检测任务 - **Description**: 基于高分辨率遥感可见光数据的细粒度密集船只目标检测任务 baseline - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 2 - **Created**: 2023-05-16 - **Last Updated**: 2024-04-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于高分辨率遥感可见光数据的细粒度密集船只目标检测任务 ## 比赛网址 ``` https://www.datafountain.cn/competitions/635/ranking ``` ## 方案简介 本方案使用PaddleDetection内置的`ppyoloer`斜框检测模型,提交得分为0.93001975232 ## 运行方式 ### 克隆项目 1. 克隆本项目 2. 切换到项目目录下 ```bash cd ship ``` 3.克隆PaddleDetection ```bash git submodule update --init --recursive ``` 或者 ```bash git clone https://gitee.com/paddlepaddle/PaddleDetection.git ``` 4. 安装 ``` cd PaddleDetection pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple cd ppdet/ext_op python setup.py install ``` 使conda安装paddle会出动态运行库路径问题,解决方案可参考[博客](https://blog.csdn.net/qq_37591986/article/details/129704978) ### 数据处理 1 .下载数据,将数据放在`data`问价夹 2.运行脚本解压并生成json文件 ``` data/trans.sh ``` 最终的文件夹结构为 ```bash |--data | |--config | |--format | |--train_upload | | |--images | | |--labelTxt | | |--Data_train.json | |--images |--PaddleDetection ``` 3.修改代码 1. 修改`PaddleDetection/ppdet/metrics/metrics.py`文件422-444行 修改前 ```python bbox_pred = '{} {} '.format(self.catid2name[catid], score) + ' '.join( [str(e) for e in bbox]) ``` 修改后 ```python bbox_pred = '{},{},'.format(self.catid2name[catid], score) + ','.join( [str(e) for e in bbox]) ``` ### 模型训练 ``` data/train.sh ``` 训练后的权重文件在`PaddleDetection/output/ppyoloe_r_crn_x_3x_atr_ms/best_model.pdparams` ### 结果生成 ``` data/gen.sh ``` 结果在`data`文件夹下