← 开源
juliandewit

kaggle_ndsb2017

Kaggle datascience bowl 2017

TutorialsML/AI fundamentalsPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
626
Star
284
Fork
+0
本周
2
贡献者
创建于 2017-04-21 · 更新于 2026-01-29 · 今日第 15876 名
主要开发者
juliandewitko

juliandewit/kaggle_ndsb2017 排名第 15,876,有 626 个星标。

同类别比较

juliandewit/kaggle_ndsb2017 排名第 15,876,此处有 8 个同类条目;datawhalechina/self-dify 排名第 15,872。

同类别比较
名称排名指标
Denis2054/RAG-Driven-Generative-AI15,839
语言:
Jupyter Notebook
星标数:
628
分叉数:
222
简介:
This repository provides programs to build Retrieval Augmented Generation (RAG) code for Generative AI with LlamaIndex, Deep Lake, and Pinecone leveraging the power of OpenAI and Hugging Face models for generation and evaluation.
Western-OC2-Lab/AutoML-Implementation-for-Static-and-Dynamic-Data-Analytics15,843
语言:
Jupyter Notebook
星标数:
628
分叉数:
111
简介:
Implementation/Tutorial of using Automated Machine Learning (AutoML) methods for static/batch and online/continual learning
madibabaiasl/modern-robotics-course15,848
星标数:
628
分叉数:
80
简介:
This repository is all the lessons for Modern Robotics Course.
datawhalechina/self-dify15,872
星标数:
626
分叉数:
65
简介:
本教程将全面指导你如何快速搭建自己的AI应用环境,从Docker桌面版的安装与配置开始,到本地部署Dify并自定义AI助手功能,让你轻松实现“猜病例”、“甜蜜哄人”、“新生入学指南”、“小红书读书卡片”与“面试宝典”等多种特色AI应用。并教会你从基础智能体到使用工作流,再到知识库、DeepResearch、数据库、MCP、复杂任务编排等高阶任务,由浅到深的学习掌握基于dify的大模型应用开发。
mrdbourke/cs329s-ml-deployment-tutorial15,890
语言:
Jupyter Notebook
星标数:
625
分叉数:
189
简介:
Code and files to go along with CS329s machine learning model deployment tutorial.
awai54st/PYNQ-Classification15,901
语言:
Jupyter Notebook
星标数:
624
分叉数:
221
简介:
Python on Zynq FPGA for Convolutional Neural Networks
csinva/csinva.github.io15,904
语言:
HTML
星标数:
624
分叉数:
103
简介:
Slides, paper notes, class notes, blog posts, and research on ML 📉, statistics 📊, and AI 🤖.
mpatacchiola/dissecting-reinforcement-learning15,911
语言:
Python
星标数:
624
分叉数:
178
简介:
Python code, PDFs and resources for the series of posts on Reinforcement Learning which I published on my personal blog
关键参数与规格
关键参数与规格
参数值
语言Python
类别Tutorials
子类别ML/AI fundamentals
关键词Healthcare
星标数626
分叉数284
贡献者2
创建日期2017-04-21
更新日期2026-01-29
1 天星标数0
7 天星标数0
排名15,876
上次排名15,680
排名变化-196
7 天星标排名15,231
上次 7 天星标排名15,236
7 天星标排名变化5
总星标排名16,242
上次总星标排名16,217
总星标排名变化-25
README 摘录

Kaggle national datascience bowl 2017 2nd place code This is the source code for my part of the 2nd place solution to the National Data Science Bowl 2017 hosted by Kaggle. For documenation about the approach go to: Note that this is my part of the code. The work of my teammate Daniel Hammack can be found here: Dependencies & data The solution is built using Keras with a tensorflow backend on windows 64bit. Next to this I used scikit-learn

, pydicom, simpleitk, beatifulsoup, opencv and XgBoost. All in all it was quite an engineering effort. General The source is cleaned up as much as possible. However I was afraid that results would not be 100% reproducible if I changed too much. Therefore some pieces could be a bit cleaner. Also I left in some bugs that I found while cleaning up. (See end of this document), The solution relies on manual labels, generated labels and 2 resulting submissions from team

member Daniel Hammack. These files are all in the "resources" map. All other file location can be configured in the settings. The raw patient data must be downloaded from the Kaggle website and the LUNA16 website. Trained models as provided to Kaggle after phase 1 are also provided through the following download: The solution is a combination of nodule detectors/malignancy regressors. My two parts are trained with LUNA16 data with a mix of positive and negative labels + malignancy info

from the LIDC dataset. My second part also uses some manual annotations made on the NDSB3 trainset. Predictions are generated from the raw nodule/malignancy predictions combined with the location information and general “mass” information. Masses are no nodules but big suspicious tissues present in the CT-images. De masses are detected with a U-net trained with manual labels. The 3rd and 4th part of te solution come from Daniel Hammack. The final solution is a blend of the

4 different part. Blending is done by taking a simple average. Preprocessing First run *step1_preprocess_ndsb. This will extract all the ndsb dicom files , scale to 1x1x1 mm, and make a directory containing . Lung segmentation mask images are also generated. They will be used later in the process for faster predicting. This will extract all the LUNA source files , scale to 1x1x1 mm, and make a directory containing . Lung segmentation mask images are also generated. This step also generates

various CSV files for positive and negative examples. The nodule detectors are trained on positive and negative 3d cubes which must be generated from the LUNA16 and NDSB datasets. py* takes the different csv files and cuts out 3d cubes from the patient slices. The cubes are saved in different directories. *resources/step1_preprocess_mass_segmenter. py* is to generate the mass u-net trainset. It can be run but the generated resized images + labels is provided in this archive

so this step does not need to be run. However, this file can be used to regenerate the traindata. Training

常见问题

记录了多少星标和分叉?

juliandewit/kaggle_ndsb2017 有 626 个星标和 284 个分叉。

仓库排名是多少?

juliandewit/kaggle_ndsb2017 排名第 15,876。

记录的语言和类别是什么?

juliandewit/kaggle_ndsb2017 有 626 个星标,语言为 Python,类别为 Tutorials。

哪个仓库排名最接近?

juliandewit/kaggle_ndsb2017 与 datawhalechina/self-dify 比较,后者排名第 15,872,有 626 个星标。

README

Kaggle national datascience bowl 2017 2nd place code

This is the source code for my part of the 2nd place solution to the National Data Science Bowl 2017 hosted by Kaggle.com. For documenation about the approach go to: http://juliandewit.github.io/kaggle-ndsb2017/

Note that this is my part of the code.
The work of my teammate Daniel Hammack can be found here: https://github.com/dhammack/DSB2017

Dependencies & data

The solution is built using Keras with a tensorflow backend on windows 64bit. Next to this I used scikit-learn, pydicom, simpleitk, beatifulsoup, opencv and XgBoost. All in all it was quite an engineering effort.

General

The source is cleaned up as much as possible. However I was afraid that results would not be 100% reproducible if I changed too much. Therefore some pieces could be a bit cleaner. Also I left in some bugs that I found while cleaning up. (See end of this document),

The solution relies on manual labels, generated labels and 2 resulting submissions from team member Daniel Hammack. These files are all in the "resources" map. All other file location can be configured in the settings.py. The raw patient data must be downloaded from the Kaggle website and the LUNA16 website.

Trained models as provided to Kaggle after phase 1 are also provided through the following download: https://retinopaty.blob.core.windows.net/ndsb3/trained_models.rar

The solution is a combination of nodule detectors/malignancy regressors. My two parts are trained with LUNA16 data with a mix of positive and negative labels + malignancy info from the LIDC dataset. My second part also uses some manual annotations made on the NDSB3 trainset. Predictions are generated from the raw nodule/malignancy predictions combined with the location information and general “mass” information. Masses are no nodules but big suspicious tissues present in the CT-images. De masses are detected with a U-net trained with manual labels.

The 3rd and 4th part of te solution come from Daniel Hammack. The final solution is a blend of the 4 different part. Blending is done by taking a simple average.

Preprocessing

First run step1_preprocess_ndsb.py. This will extract all the ndsb dicom files , scale to 1x1x1 mm, and make a directory containing .png slice images. Lung segmentation mask images are also generated. They will be used later in the process for faster predicting. Then run step1_preprocess_luna16.py. This will extract all the LUNA source files , scale to 1x1x1 mm, and make a directory containing .png slice images. Lung segmentation mask images are also generated. This step also generates various CSV files for positive and negative examples.

The nodule detectors are trained on positive and negative 3d cubes which must be generated from the LUNA16 and NDSB datasets. step1b_preprocess_make_train_cubes.py takes the different csv files and cuts out 3d cubes from the patient slices. The cubes are saved in different directories. resources/step1_preprocess_mass_segmenter.py is to generate the mass u-net trainset. It can be run but the generated resized images + labels is provided in this archive so this step does not need to be run. However, this file can be used to regenerate the traindata.

Training neural nets

First train the 3D convnets that detect nodules and predict malignancy. This can be done by running the step2_train_nodule_detector.py file. This will train various combinations of positive and negative labels. The resulting models (NAMES) are stored in the ./workdir directory and the final results are copied to the models folder. The mass detector can be trained using step2_train_mass_segmenter.py. It trains 3 folds and final models are stored in the models (names) folder. Training the 3D convnets will be around 10 hours per piece. The 3 mass detector folds will take around 8 hours in total

Predicting neural nets

Once trained or downloaded through the url (https://retinopaty.blob.core.windows.net/ndsb3/trained_models.rar) the models are placed in the ./models/ directory. From there the nodule detector step3_predict_nodules.py can be run to detect nodules in a 3d grid per patient. The detected nodules and predicted malignancy are stored per patient in a separate directory. The masses detector is already run through the step2_train_mass_segmenter.py and will stored a csv with estimated masses per patient.

Training of submissions, combining submissions for final submission.

Based on the per-patient csv’s the masses.csv and other metadata we will train an xgboost model to generate submissions (step4_train_submissions.py). There are 3 levels of submissions. First the per-model submissions. (level1). Different models are combined in level2, and Daniel’s submissions are added. These level 2 submissions will be combined (averaged) into one final submission. Below are the different models that will be generated/combined.

  • Level 1:

Luna16_fs (trained on full luna16 set)

Luna16_ndsbposneg v1 (trained on luna16 + manual pos/neg labels in ndsb)

Luna16_ndsbposneg v2 (trained on luna16 + manual pos/neg labels in ndsb)

Daniel model 1

Daniel model 2

posneg, daniel will be averaged into one level 2 model

  • Level 2.

Luna16_fs

Luna16_ndsbposneg

Daniel

These 3 models will be averaged into 1 final_submission.csv

Bugs and suggestions.

First of all. Duringing cleanup I noticed that I missed 10% of the LUNA16 patients because I overlooked subset0. That might be a 100.000 dollar mistake. For reprodicibility reasons I kept the bug in. In settings.py you can adjust the code to also take this subset into account.

Suggestions for improvement would be:

  • Take the 10% extra LUNA16 condidates.
  • Use different blends of the positive and negative labels
  • Other neural network architectures.
  • Etc..
排名相邻
同类项目