{"id":20714666,"url":"https://github.com/fabsta/k_hpa","last_synced_at":"2026-04-20T17:31:51.934Z","repository":{"id":142929750,"uuid":"157276274","full_name":"fabsta/k_hpa","owner":"fabsta","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-25T08:25:38.000Z","size":1586,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T06:50:18.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/fabsta.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":"2018-11-12T21:01:45.000Z","updated_at":"2018-11-25T08:25:40.000Z","dependencies_parsed_at":"2023-05-01T22:31:13.397Z","dependency_job_id":null,"html_url":"https://github.com/fabsta/k_hpa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabsta/k_hpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsta%2Fk_hpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsta%2Fk_hpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsta%2Fk_hpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsta%2Fk_hpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabsta","download_url":"https://codeload.github.com/fabsta/k_hpa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsta%2Fk_hpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32057605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"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":[],"created_at":"2024-11-17T02:33:27.339Z","updated_at":"2026-04-20T17:31:51.889Z","avatar_url":"https://github.com/fabsta.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Human protein atlas image classification\n\n[competition link](https://www.kaggle.com/c/human-protein-atlas-image-classification)\n\n\nDataset\n\n\nInteresting kernels:\n* [fastai starter](http://nbviewer.jupyter.org/github/fabsta/interesting_notebooks/blob/master/pretrained-resnet34-with-rgby-0-460-public-lb.ipynb)\n* [fastai course multi-classification example](http://nbviewer.jupyter.org/github/fastai/fastai/blob/master/courses/dl1/lesson2-image_models.ipynb#Multi-label-classification)\n\n[fastai v1. starter (github)](https://github.com/wdhorton/protein-atlas-fastai), [datablocks api](http://nbviewer.jupyter.org/github/wdhorton/protein-atlas-fastai/blob/master/resnet50_basic_datablocks.ipynb)\n\nuseful links\n[data augmentation](https://becominghuman.ai/data-augmentation-using-fastai-aefa88ca03f1)\n\n\nWorkflow\n- [ ]  Import libraries\n- [ ]  Define data path,\n- [ ]  Defining data loader\n- [ ]  Define focal loss and accuracy\n- [ ]  Define custom architecture\n- [ ]  Get learner ready\n- [ ]  Start training\n- [ ]  Train head of model\n- [ ]  Unfreeze all weights and train entire model\n- [ ]  Test time augmentation\n- [ ]  Validation, F1 score\n- [ ] Submission\n\n\nThings to check out:\ngpu-stats\nin python notebook\n\ngithub todo lists\nadd overview of important libaries on top of each file\n\n\n## Needs sorting\n\nData\n- [ ] sample dataset\n- [ ] Use more data: [A dataset of images and morphological profiles of 30 000 small-molecule treatments using the Cell Painting assay](https://academic.oup.com/gigascience/article/6/12/giw014/2865213)\n\nPreprocessing\n- [ ] Discarding yellow runs faster, doesn't change result. more discards?\n- [ ] Merge two semantically similar channels\n\nTraining\n- [ ] Progressively increase image size\n- [ ] Stratified training data https://github.com/trent-b/iterative-stratification \n- [ ] Cross validation example [here](https://github.com/radekosmulski/tgs_salt_solution/blob/master/unet34_like_128.ipynb)\n- [ ] Other data augmentation techniques (cropping images), what would be logical?\n- [ ] Find optimal weight decay: [link](http://nbviewer.jupyter.org/github/MicPie/lung/blob/master/lung_inflammation_v4_ResNet34.ipynb)\n\nModel\n- [ ] 4-Channel model: swap first layer: [link](https://forums.fast.ai/t/lesson-3-in-class-discussion/7809/86?u=jpjamipark).  I added simple ConvBlock reducing from 4 to 3 channels before pretrained model. Works good.@ryches I freeze pretrained network, and set this Convlayer and last layers to trainable. https://forums.fast.ai/t/how-to-do-transfer-learning-with-different-inputs/28395/3\n- [ ] Save best model\n- [ ] Use other pre-trained model? https://github.com/Cadene/pretrained-models.pytorch \n- [ ] Fastai v1 starter pack: [kaggle](https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/71039), [github](https://github.com/wdhorton/protein-atlas-fastai), [notebook](http://nbviewer.jupyter.org/github/wdhorton/protein-atlas-fastai/blob/master/resnet50_basic.ipynb)\n- [ ] other notebook: [lesson2-protein-human-protein-atlas-v1_256-resnet34.ipynb](http://nbviewer.jupyter.org/github/artste/fastai-samples/blob/master/kaggle/lesson2-protein-human-protein-atlas-v1_256-resnet34.ipynb)\n- [ ] another fastai starter: [link](http://nbviewer.jupyter.org/github/ademyanchuk/protein_atlas_baseline/blob/master/protein-1.ipynb)\n- [ ] learn = create_cnn(data, arch, metrics=[acc_02, f_score]).to_fp16()\n- [ ] Replace average pooling layer with adaptive average layer\n- [ ] Papers: [GapNet-PL paper](https://openreview.net/pdf?id=ryl5khRcKm), [Cell organelle classification with fully convolutional neural networks](https://pdfs.semanticscholar.org/8015/5ab5da4c739541a4d6b97c0189355ca7d476.pdf)\n\nScore\n- [ ] Check if f1-score is used\n- [ ] Threshold selection for multi-label classification, [paper](https://www.csie.ntu.edu.tw/~cjlin/papers/threshold.pdf)\n- [ ] Check out code from [here](https://www.kaggle.com/tcapelle/4-channel-darknet-sz-512)\n\nother competitions\n\nimage preprocessing\n\n\n\n\nfilters:\ngreen filter for prediction, others for reference\nmerging images improves score\t\nDiscarding yellow runs faster, doesnt change result. more discards?\nGreen is the protein itself. The other colors are other parts of the cell. While they are not required, they can provide useful information.\nyellow means endoplasmatic reticulum?\n\n\n\nTrain/Test data split:\nmultilabel stratification python package\nclass imbalance\n“huge” difference between validation and test score\nUse cross-validation to get better understanding of predictions on diff validation sets\n\nf1 metric:\norder of ids is important!\nmacro f1 score\nsklearn.metrics.f1_score with average=\"macro\"\nfocal loss + soft F1 and focal loss - log(soft F1) for faster convergence\n\nLB:\nLB probing using all labels benchmark\n\nPostprocessing:\nThreshold selection for multi-label classification\n\n\nImprovement ideas:\n- split big image into smaller\n- make a network that will give me bounding boxes of cells to process. Then from the large scale images I can get smaller images of cells to train a network on.\n\n- ensembl ideas (nasnet)\n- \nif there the image contain e.g. \"one\" object of type A, it is has a label A.\nif it contains two, three, …. objects, it is has still a label A\n\nyou can always break the image into smaller image an ensemble back again. My CDiscount challenge solution gives you a clue on how to do it!\n- Use features from different resolutions\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabsta%2Fk_hpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabsta%2Fk_hpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabsta%2Fk_hpa/lists"}