{"id":16495021,"url":"https://github.com/nachifur/llpc","last_synced_at":"2025-03-16T18:32:05.895Z","repository":{"id":54909263,"uuid":"303896738","full_name":"nachifur/LLPC","owner":"nachifur","description":"Frontiers in Neuroinformatics 2022: Local Label Point Correction for Edge Detection of Overlapping Cervical Cells","archived":false,"fork":false,"pushed_at":"2024-05-19T11:48:39.000Z","size":1153,"stargazers_count":29,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T12:16:12.447Z","etag":null,"topics":["data-centric-ai","dataset","deep-learning","edge-detection","label-correction","overlapping-cell","point-correction","segmantation","segmentation"],"latest_commit_sha":null,"homepage":"https://www.frontiersin.org/articles/10.3389/fninf.2022.895290/full","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/nachifur.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-14T03:53:06.000Z","updated_at":"2024-11-01T13:32:07.000Z","dependencies_parsed_at":"2024-10-27T11:06:56.319Z","dependency_job_id":"b2313caa-1dc2-4a1d-b89d-81b7f41b6cab","html_url":"https://github.com/nachifur/LLPC","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nachifur%2FLLPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nachifur%2FLLPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nachifur%2FLLPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nachifur%2FLLPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nachifur","download_url":"https://codeload.github.com/nachifur/LLPC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826783,"owners_count":20354220,"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":["data-centric-ai","dataset","deep-learning","edge-detection","label-correction","overlapping-cell","point-correction","segmantation","segmentation"],"created_at":"2024-10-11T14:27:07.113Z","updated_at":"2025-03-16T18:32:01.886Z","avatar_url":"https://github.com/nachifur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local Label Point Correction for Edge Detection of Overlapping Cervical Cells\nOur unique contributions are summarized as follows:\n* We are the **first to propose a label correction method based on\nannotation points for edge detection and image segmentation**.\nBy correcting the position of these label points, our label\ncorrection method can generate higher-quality label, which\ncontributes 30–40 AP improvement on multiple baseline\nmodels.\n* We construct a **largest publicly cervical cell edge detection\ndataset** based on our LLPC. Our dataset is ten times larger than\nthe previous datasets, which greatly facilitates the development\nof overlapping cell edge detection.\n* We present the **first publicly available label correction\nbenchmark for improving contour annotation**. Our study\nserves as a potential catalyst to promote label correction\nresearch and further paves the way to construct accurately\nannotated datasets for edge detection and image segmentation.\n\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/nachifur/LLPC\" target=\"_blank\"\u003e\n\u003cimg align=\"center\" alt=\"Visual comparison of the original label and our corrected label\" src=\"https://github.com/nachifur/LLPC/blob/main/img/fig1.jpg\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/nachifur/LLPC\" target=\"_blank\"\u003e\n\u003cimg align=\"center\" alt=\"Label correction for edge detection and semantic segmentation\" src=\"https://github.com/nachifur/LLPC/blob/main/img/fig8.jpg\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n# 1. Resources\n[国内资源链接(密码：e2ww)](https://rec.ustc.edu.cn/share/16db9c80-15d5-11ef-9ca4-7b154f4fe8b0)\n\n* Dataset: [CCEDD](https://mailustceducn-my.sharepoint.com/:u:/g/personal/nachifur_mail_ustc_edu_cn/EX0v39dd8kRDhavIoFqxHyoBuqXql9sdPXoyaWptsUvfKw?e=8lMSga)\n* Results on CCEDD: [unet_plus_plus_BCEloss + corrected label](https://mailustceducn-my.sharepoint.com/:u:/g/personal/nachifur_mail_ustc_edu_cn/Ed4SzbyvuXdCuuaJ-twoEjgB_DBYhc4bwzen4qOE32ZevQ?e=QVyuCK)\n* [paper](https://www.frontiersin.org/articles/10.3389/fninf.2022.895290/full)\n* [Early manuscripts in arXiv (Mon, 5 Oct 2020 11:01:45 UTC)](https://arxiv.org/abs/2010.01919v1)\n\n# 2. Environments\nubuntu18.04+cuda10.2+pytorch1.1.0\n\ncreate environments\n```\nconda env create -f install.yaml\n```\nactivate environments\n```\nconda activate LLPC\n```\n# 3. Datset - CCEDD\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/nachifur/LLPC\" target=\"_blank\"\u003e\n\u003cimg align=\"center\" alt=\"CCEDD\" width = \"300\" height = \"120\" src=\"https://github.com/nachifur/LLPC/blob/main/img/CCEDD.jpg\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n**Although we provide original labels (uncorrected), we recommend that you use corrected labels to train deep networks.**\n## 3.1 Datset Structure\nThe data folders should be:\n```\nLLPC\n    * data_processing\n    * unet_plus_plus_BCEloss\n    * CCEDD\n        - label_correct\n            - edge\n            - png\n            - json\n        - label_no_correct\n            - edge\n            - png\n            - json\n```\n1. download CCEDD\n\nunzip: \n* CCEDD/png.zip -\u003e LLPC/CCEDD/label_correct\n* CCEDD/png.zip -\u003e LLPC/CCEDD/label_no_correct\n2. Generate Dataset\n```\ncd data_processing\npython data_processing/datasets_generate.py 0\n```\n## 3.2 Local Label Point Correction Algorithm\nOur LLPC requires a original annotation file (`CCEDD/label_correct/json`) and a original image (`CCEDD/label_correct/png`) to generate a corrected edge label (`CCEDD/label_correct/edge`). In fact, we have already provided the edge label (`CCEDD/label_correct/edge`). Therefore, if you are not interested in point correction techniques and focus on the design of edge detection networks, you can skip this section.\n### 3.2.1. Unzip Annotated Files\nunzip: \n* CCEDD/json.zip -\u003e LLPC/CCEDD/label_correct\n* CCEDD/json.zip -\u003e LLPC/CCEDD/label_no_correct\n### 3.2.2. Debug for LLPC\nEdit `data_processing/data_processing.py`, uncomment the code below:\n```\n    generate edge from points\n    time_start=time.time()\n    print(time_start)\n    if label_correct:\n        gen_edge_from_point_base_gradient(DATA_PATH, debug)\n    else:\n        gen_edge_from_point(DATA_PATH, debug)\n    time_end=time.time()\n    print(time_end)\n    print('generate edge from points time cost',time_end-time_start,'s')\n```\nDebug for LLPC:\n```\ncd data_processing\npython data_processing/datasets_generate.py 1\n```\n### 3.2.3. Generating Edges from Points by Our LLPC\n```\ncd data_processing\npython data_processing/datasets_generate.py 0\n```\n# 4. Training\n```\ncp data_processing/label_correct_config.yml unet_plus_plus_BCEloss/config.yml.example\nconda activate LLPC\ncd unet_plus_plus_BCEloss\npython run.py\n```\n# 5. Test / Result\n`python run.py` can complete training, testing, and evaluation. \n\nYou can use the following command to view the evaluation result.\n```\ncd unet_plus_plus_BCEloss\npython unet_plus_plus_BCEloss/show_eval_result.py\n```\nunet_plus_plus_BCEloss Result:\n```\naverage precision mean:    0.763\naverage recall mean:    0.613\nODS:    F(0.709,0.674) = 0.691    [th=0.350]\nOIS:    F(0.739,0.667) = 0.701\nAP:    AP = 0.755\n```\n\n# 6. Citation\nIf you find our work useful in your research, please consider citing:\n```\n@ARTICLE{10.3389/fninf.2022.895290,\nAUTHOR={Liu, Jiawei and Fan, Huijie and Wang, Qiang and Li, Wentao and Tang, Yandong and Wang, Danbo and Zhou, Mingyi and Chen, Li},   \nTITLE={Local Label Point Correction for Edge Detection of Overlapping Cervical Cells},      \nJOURNAL={Frontiers in Neuroinformatics},      \nVOLUME={16},      \nYEAR={2022},      \nURL={https://www.frontiersin.org/article/10.3389/fninf.2022.895290},       \nDOI={10.3389/fninf.2022.895290},      \nISSN={1662-5196},   \nABSTRACT={Accurate labeling is essential for supervised deep learning methods. However, it is almost impossible to accurately and manually annotate thousands of images, which results in many labeling errors for most datasets. We proposes a local label point correction (LLPC) method to improve annotation quality for edge detection and image segmentation tasks. Our algorithm contains three steps: gradient-guided point correction, point interpolation, and local point smoothing. We correct the labels of object contours by moving the annotated points to the pixel gradient peaks. This can improve the edge localization accuracy, but it also causes unsmooth contours due to the interference of image noise. Therefore, we design a point smoothing method based on local linear fitting to smooth the corrected edge. To verify the effectiveness of our LLPC, we construct a largest overlapping cervical cell edge detection dataset (CCEDD) with higher precision label corrected by our label correction method. Our LLPC only needs to set three parameters, but yields 30–40% average precision improvement on multiple networks. The qualitative and quantitative experimental results show that our LLPC can improve the quality of manual labels and the accuracy of overlapping cell edge detection. We hope that our study will give a strong boost to the development of the label correction for edge detection and image segmentation. We will release the dataset and code at: \u003cext-link ext-link-type=\"uri\" xlink:href=\"https://github.com/nachifur/LLPC\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003ehttps://github.com/nachifur/LLPC\u003c/ext-link\u003e.}\n}\n```\n\n\n# 7. Terms of Use \nTerms of use: by downloading the CCEDD you agree to the following terms:\n\n- You will use the data only for non-commercial research and educational purposes.\n- You will NOT distribute the above images.\n- Shenyang Institute of Automation, Chinese Academy of Sciences makes no representations or warranties regarding the data, including but not limited to warranties of non-infringement or fitness for a particular purpose.\n- You accept full responsibility for your use of the data and shall defend and indemnify Shenyang Institute of Automation, Chinese Academy of Sciences, including its employees, officers and agents, against any and all claims arising from your use of the data, including but not limited to your use of any copies of copyrighted images that you may create from the data.\n\n# 8. Contact\nPlease contact Jiawei Liu if there is any question (liujiawei18@mails.ucas.ac.cn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnachifur%2Fllpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnachifur%2Fllpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnachifur%2Fllpc/lists"}