{"id":28145018,"url":"https://github.com/hmchuong/ml-bonesuppression","last_synced_at":"2026-03-10T14:02:39.660Z","repository":{"id":129608829,"uuid":"131502550","full_name":"hmchuong/ML-BoneSuppression","owner":"hmchuong","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-19T08:00:25.000Z","size":3716,"stargazers_count":60,"open_issues_count":4,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-06T10:07:13.643Z","etag":null,"topics":["ae-likemodel","bone-suppression","bse","chest-xray-images","computer-vision","deep-learning","machine-learning","radiologist","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/hmchuong.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-29T14:42:41.000Z","updated_at":"2025-05-31T15:52:56.000Z","dependencies_parsed_at":"2023-04-09T10:49:24.024Z","dependency_job_id":null,"html_url":"https://github.com/hmchuong/ML-BoneSuppression","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hmchuong/ML-BoneSuppression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmchuong%2FML-BoneSuppression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmchuong%2FML-BoneSuppression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmchuong%2FML-BoneSuppression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmchuong%2FML-BoneSuppression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmchuong","download_url":"https://codeload.github.com/hmchuong/ML-BoneSuppression/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmchuong%2FML-BoneSuppression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30336073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: 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":["ae-likemodel","bone-suppression","bse","chest-xray-images","computer-vision","deep-learning","machine-learning","radiologist","tensorflow"],"created_at":"2025-05-14T22:13:52.495Z","updated_at":"2026-03-10T14:02:39.644Z","avatar_url":"https://github.com/hmchuong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bone Suppression from Chest Radiographs\n\nThe project is a tool to build **Bone Suppression** model, written in tensorflow\n\n\u003cimg src=\"description.png\" alt=\"CAM example image\"/\u003e\n\n## What is [Bone Suppression](https://www.researchgate.net/publication/320252756_Deep_learning_models_for_bone_suppression_in_chest_radiographs?enrichId=rgreq-7b19be48d9763ea61b22252eaf96edca-XXX\u0026enrichSource=Y292ZXJQYWdlOzMyMDI1Mjc1NjtBUzo1ODQ1MzY0NDY0ODAzODRAMTUxNjM3NTc1NzU5Nw%3D%3D\u0026el=1_x_3\u0026_esc=publicationCoverPdf)?\nBone suppression is an autoencoder-like model for eliminating bone shadow from Chest X-ray images. The model require two types of dataset: normal  and bone-suppression X-ray images. The target model can suppress bone shadow from Chest X-ray images, help Radiologists diagnose better lung related diseases. Although there are some softwares supporting bone suppression ([ClearRead](https://www.riveraintech.com/clearread-xray/), [CareStream](https://www.itnonline.com/content/carestream%E2%80%99s-new-bone-suppression-software-receives-fda-clearance)), this project is a practical open source in computer vision and deep learning.\n\n## In this project you can\n1. Preprocessing data, including registration and augmentation.\n2. Train/test by following the quickstart. You can get a model with performance close to the paper.\n3. Visualize your training result with tensorboard\n\n## Requirements\nThe project requires `Python\u003e=3.5`.\n\nI have trained on an instance with `1 NVIDIA GTX 1080Ti (11GB VRAM)` and it takes approximately 14 hours.\n\n## Configuration\n### [DATA](config/data_preprocessing.cfg)\n1. You can download the dataset [here](https://www.kaggle.com/hmchuong/xray-bone-shadow-supression). This dataset includes 3 parts: `JSRT` dataset in `png` format, `BSE_JSRT` dataset in `png` format, and `augmented` dataset which can be trained directly.\n2. To register the dataset, make sure you set `data_registration` to `true`, and the input images are read from `source_dir` (JSRT) and `target_dir` (BSE_JSRT). The registered images will be saved to `registered_output_dir` into `source` and `target` subdirectories.\n3. To augment the dataset, make sure you set `data_augmentation` to `true`, the `source_dir` and `target_dir` will be used to augment. `The total data after augmentation for source/target` = `augmentation_seed` X total number of images in `source_dir` or `target_dir`. The augmented images will be saved to `source` and `target` subdirectories of `augmented_output_dir` with `.png` extension.\n\n### [TRAIN](config/train.cfg)\n1. `source_folder` and `target_folder` are folders to load training images.\n4. If you want to continue training from your last model, set `use_trained_model` to true and `trained_model` to your model path.\n5. `output_model` is where you save your model during training and `output_log` is where you save the tensorboard checkpoints.\n6. The other parameters is set following the published [paper](https://www.researchgate.net/publication/320252756_Deep_learning_models_for_bone_suppression_in_chest_radiographs?enrichId=rgreq-7b19be48d9763ea61b22252eaf96edca-XXX\u0026enrichSource=Y292ZXJQYWdlOzMyMDI1Mjc1NjtBUzo1ODQ1MzY0NDY0ODAzODRAMTUxNjM3NTc1NzU5Nw%3D%3D\u0026el=1_x_3\u0026_esc=publicationCoverPdf)\n\n## Pretrained model\nIf you want to start testing without training from scratch, you can use the [model](/model) I have trained. The model has loss value: 0.01409, MSE: 7.1687e-4, MS-SSIM: 0.01517\n\n## Quickstart\n**Note that currently this project can only be executed in Linux and macOS. You might run into some issues in Windows.**\n1. Create \u0026 activate a new python3 virtualenv. (optional)\n2. Install dependencies by running `pip install -r requirements.txt`.\n3. Run `python preprocessing.py` to preprocess dataset. If you want to change your config path:\n```\npython preprocessing.py --config \u003cconfig path\u003e\n```\n4. Run `python train.py` to train a new model. If you want to change your config path:\n```\npython train.py --config \u003cconfig path\u003e\n```\nDuring training, you can use Tensorboard to visualize the results:\n```\ntensorboard --logdir=\u003coutput_log in train.cfg\u003e\n```\n5. Run `python test.py` to evaluate your model on specific image. To change default parameters, you can use:\n```\npython test.py --model \u003cmodel_path\u003e --config \u003cmodel config path\u003e --input \u003cimage path\u003e --output \u003coutput image path\u003e\n```\n\n## Acknowledgement\nI would like to thank [LoudeNOUGH](https://github.com/LoudeNOUGH/bone-suppression) for scratch training script and Hussam Habbreeh (حسام هب الريح) for sharing his experiences on this task.\n\n## Author\nChuong M. Huynh (minhchuong.itus@gmail.com)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmchuong%2Fml-bonesuppression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmchuong%2Fml-bonesuppression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmchuong%2Fml-bonesuppression/lists"}