{"id":20253102,"url":"https://github.com/werserk/healthdatahack","last_synced_at":"2026-05-12T14:09:13.589Z","repository":{"id":37573069,"uuid":"482512353","full_name":"werserk/HealthDataHack","owner":"werserk","description":"Solution of Health Data Hack. Task is segmentation of colorectal cancer on high resoultion histological images,","archived":false,"fork":false,"pushed_at":"2022-12-23T10:56:33.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T14:53:27.020Z","etag":null,"topics":["cancer","competition","deep-learning","hackathon","histological-images","segmentation"],"latest_commit_sha":null,"homepage":"https://codenrock.com/contests/hackhealth#/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/werserk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-17T12:06:16.000Z","updated_at":"2024-07-28T12:44:39.000Z","dependencies_parsed_at":"2023-01-30T18:16:32.581Z","dependency_job_id":null,"html_url":"https://github.com/werserk/HealthDataHack","commit_stats":null,"previous_names":["werserk/healthdatahack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/werserk/HealthDataHack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werserk%2FHealthDataHack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werserk%2FHealthDataHack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werserk%2FHealthDataHack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werserk%2FHealthDataHack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/werserk","download_url":"https://codeload.github.com/werserk/HealthDataHack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werserk%2FHealthDataHack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32942335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cancer","competition","deep-learning","hackathon","histological-images","segmentation"],"created_at":"2024-11-14T10:21:23.086Z","updated_at":"2026-05-12T14:09:13.536Z","avatar_url":"https://github.com/werserk.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Health Data Hack\n\n## Introduction\nThis is our team’s 4th place solution for [Healt Data Hack](https://codenrock.com/contests/hackhealth#/) (second task). This contest was about segmentation of colorectal cancer cells on high resolution histological slices. Competition data was prepared by MIPT University, medtech.moscow and Phystech School of Biological and Medical Physics.\n\n## Solution\n### Splitting images\nWe did a [cutter.py](modeling/cutter.py) module that pads each side of the image to %patch_size length and then goes with sliding windows (window size equal to patch_size). In training we used two different patch sizes: 1024x1024 and 2048x204 with 50% overlap:\n\n\u003cimg width=\"1103\" alt=\"2022-04-18_15-29\" src=\"https://user-images.githubusercontent.com/54595287/163815606-359b53ea-e8da-48a8-af5d-370a845d1559.png\"\u003e  \n\n### Tresholding\nWe left only those patches where was a disease\n\n### TTA\nFor TTA we used simple averaging of the default image and augmentated:\n- Horizontally flipped\n- Vertically flipped\n- Rotated (90, 180, 270 angles)\n\n### Final ensemble\nOur final solution contains [two models](https://drive.google.com/drive/folders/1561kJfurS61cxtOjkpOh0-6pmhNPXPiW?usp=sharing):\n1. Unet++ with EffNetb7 backbone and 2048x2048 patch size.\n2. Unet++ with EffNetb7 backbone and 1024x1024 patch size.\n\nWe tried different types of Ensembles (MaxProb, MinProb, MeanProb) and Simple Averaging Ensemble obtain the best score.\n\n## Project structure\n- **FirstLook.ipynb** - exploratory data analysis notebook\n- **Training.ipynb** - notebook for training all models\n- **Inference.ipynb** - inference notebook\n- **productions.py** - preparing test data for prediction\n- **train_functions.py** - module for training and validation\n- **modeling**\n  - cutter.py - module for splitting images\n  - losses.py - custom loss functions\n  - metrics.py - custom metrics\n  - models.py - custom models\n- **utils**\n  - cfgtools.py - configuration file\n  - datagenerator.py - module for preparing data for training\n  - dataset.py - module for preparing data for training\n\n_Additional data_:\n[train data](https://drive.google.com/file/d/1erA0TiUZb2os-QJ-vFN_K1bhNBroBLpO/view),\n[test data](https://drive.google.com/file/d/1NUQjp10RmymKohg0cjqL6G3fRk_DpVsH/view),\n[weights](https://drive.google.com/drive/folders/1561kJfurS61cxtOjkpOh0-6pmhNPXPiW?usp=sharing), \n[configs](https://drive.google.com/drive/folders/1frbD1cqIEN_fpoyd6GRSKYKS2sNpgVMU?usp=sharing),\n[presentation](https://docs.google.com/presentation/d/1SN-Olu-dxH2VZAZuMpiBncV508JN0pVh/edit?usp=sharing\u0026ouid=116202268270672729224\u0026rtpof=true\u0026sd=true), \n[text](https://docs.google.com/document/d/1RKJ9ijLmTFxTVfYAuHraC5Q5J9zVKxcr/edit?usp=sharing\u0026ouid=116202268270672729224\u0026rtpof=true\u0026sd=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerserk%2Fhealthdatahack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwerserk%2Fhealthdatahack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerserk%2Fhealthdatahack/lists"}