Harshit Ghosh commited on
Commit ·
b0fbfb5
1
Parent(s): b0bcfd5
huggingface management
Browse files- .env.example +6 -0
- .github/workflows/pages.yml +50 -0
- .gitignore +11 -2
- README.md +30 -0
- docs/index.md +20 -0
- requirements.txt +1 -0
.env.example
CHANGED
|
@@ -16,3 +16,9 @@ ICH_LOCAL_MODE=1
|
|
| 16 |
# Logging level
|
| 17 |
# Values: DEBUG | INFO | WARNING | ERROR
|
| 18 |
ICH_LOG_LEVEL=INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Logging level
|
| 17 |
# Values: DEBUG | INFO | WARNING | ERROR
|
| 18 |
ICH_LOG_LEVEL=INFO
|
| 19 |
+
|
| 20 |
+
# Hugging Face publishing
|
| 21 |
+
# Create token: https://huggingface.co/settings/tokens
|
| 22 |
+
HF_TOKEN=
|
| 23 |
+
# Example: your-username/ich-b4-model
|
| 24 |
+
HF_REPO_ID=
|
.github/workflows/pages.yml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy GitHub Pages
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [ "main" ]
|
| 6 |
+
paths:
|
| 7 |
+
- "docs/**"
|
| 8 |
+
- ".github/workflows/pages.yml"
|
| 9 |
+
workflow_dispatch:
|
| 10 |
+
|
| 11 |
+
permissions:
|
| 12 |
+
contents: read
|
| 13 |
+
pages: write
|
| 14 |
+
id-token: write
|
| 15 |
+
|
| 16 |
+
concurrency:
|
| 17 |
+
group: "pages"
|
| 18 |
+
cancel-in-progress: true
|
| 19 |
+
|
| 20 |
+
jobs:
|
| 21 |
+
build:
|
| 22 |
+
runs-on: ubuntu-latest
|
| 23 |
+
steps:
|
| 24 |
+
- name: Checkout
|
| 25 |
+
uses: actions/checkout@v4
|
| 26 |
+
|
| 27 |
+
- name: Configure Pages
|
| 28 |
+
uses: actions/configure-pages@v5
|
| 29 |
+
|
| 30 |
+
- name: Build with Jekyll
|
| 31 |
+
uses: actions/jekyll-build-pages@v1
|
| 32 |
+
with:
|
| 33 |
+
source: ./docs
|
| 34 |
+
destination: ./_site
|
| 35 |
+
|
| 36 |
+
- name: Upload Pages Artifact
|
| 37 |
+
uses: actions/upload-pages-artifact@v3
|
| 38 |
+
with:
|
| 39 |
+
path: ./_site
|
| 40 |
+
|
| 41 |
+
deploy:
|
| 42 |
+
environment:
|
| 43 |
+
name: github-pages
|
| 44 |
+
url: ${{ steps.deployment.outputs.page_url }}
|
| 45 |
+
runs-on: ubuntu-latest
|
| 46 |
+
needs: build
|
| 47 |
+
steps:
|
| 48 |
+
- name: Deploy to GitHub Pages
|
| 49 |
+
id: deployment
|
| 50 |
+
uses: actions/deploy-pages@v4
|
.gitignore
CHANGED
|
@@ -35,10 +35,19 @@ logs/
|
|
| 35 |
.coverage.*
|
| 36 |
htmlcov/
|
| 37 |
coverage.xml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
# Generated inference artifacts
|
| 40 |
download_imp/*
|
| 41 |
-
|
|
|
|
| 42 |
# Local downloaded data
|
| 43 |
data/
|
| 44 |
datasets/
|
|
|
|
| 35 |
.coverage.*
|
| 36 |
htmlcov/
|
| 37 |
coverage.xml
|
| 38 |
+
upload_to_huggingface.py
|
| 39 |
+
|
| 40 |
+
# Generated inference artifacts (keep source code, ignore heavy binaries)
|
| 41 |
+
download_imp/outputs/
|
| 42 |
+
download_imp/dicom_inputs/
|
| 43 |
+
download_imp/*.pth
|
| 44 |
+
download_imp/*.pt
|
| 45 |
+
download_imp/*.pkl
|
| 46 |
+
download_imp/*.onnx
|
| 47 |
|
|
|
|
| 48 |
download_imp/*
|
| 49 |
+
# Local downloaded artifacts
|
| 50 |
+
download/
|
| 51 |
# Local downloaded data
|
| 52 |
data/
|
| 53 |
datasets/
|
README.md
CHANGED
|
@@ -70,6 +70,36 @@ Model checkpoints and heavy binary artifacts are intentionally ignored for GitHu
|
|
| 70 |
|
| 71 |
This keeps the repository lightweight and reproducible while allowing local/model-private inference.
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
## AI-Assisted CT-Based Intracranial Hemorrhage Detection with Explainability and Clinical Reporting
|
| 74 |
|
| 75 |
---
|
|
|
|
| 70 |
|
| 71 |
This keeps the repository lightweight and reproducible while allowing local/model-private inference.
|
| 72 |
|
| 73 |
+
### Publish Model To Hugging Face
|
| 74 |
+
|
| 75 |
+
1. Create a token with `Write` access: `https://huggingface.co/settings/tokens`
|
| 76 |
+
1. Set credentials in `.env` (or export in shell):
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
HF_TOKEN=your_hf_token
|
| 80 |
+
HF_REPO_ID=your-username/ich-b4-model
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
1. Upload model artifacts:
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
python scripts/upload_to_huggingface.py --repo-id "$HF_REPO_ID" --private
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
Published model repository:
|
| 90 |
+
|
| 91 |
+
- [Hugging Face Model Repo](https://huggingface.co/HarshCode/eff_b4_brain)
|
| 92 |
+
|
| 93 |
+
### Host On GitHub Pages
|
| 94 |
+
|
| 95 |
+
1. Ensure your default branch is `main`.
|
| 96 |
+
1. Push this repository with `.github/workflows/pages.yml` and `docs/`.
|
| 97 |
+
1. In GitHub repository settings:
|
| 98 |
+
1. Open `Settings -> Pages`
|
| 99 |
+
1. Set source to `GitHub Actions`
|
| 100 |
+
|
| 101 |
+
The site will be published automatically after push.
|
| 102 |
+
|
| 103 |
## AI-Assisted CT-Based Intracranial Hemorrhage Detection with Explainability and Clinical Reporting
|
| 104 |
|
| 105 |
---
|
docs/index.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ICH Screening Project
|
| 2 |
+
|
| 3 |
+
AI-assisted intracranial hemorrhage screening from head CT with:
|
| 4 |
+
|
| 5 |
+
- EfficientNet-B4 based inference
|
| 6 |
+
- 2.5D context pipeline
|
| 7 |
+
- Calibration-aware triage outputs
|
| 8 |
+
- Flask web interface for upload, reports, logs, and evaluation
|
| 9 |
+
|
| 10 |
+
## Repository
|
| 11 |
+
|
| 12 |
+
Source code and app: see the main project README in this repository.
|
| 13 |
+
|
| 14 |
+
## Model Artifacts
|
| 15 |
+
|
| 16 |
+
Model artifacts are published separately on Hugging Face (recommended) to keep this GitHub repository lightweight.
|
| 17 |
+
|
| 18 |
+
## Disclaimer
|
| 19 |
+
|
| 20 |
+
This project is a screening and decision-support tool. It is not a standalone diagnostic device.
|
requirements.txt
CHANGED
|
@@ -12,5 +12,6 @@ scikit-learn
|
|
| 12 |
|
| 13 |
blackbox-recorder
|
| 14 |
python-dotenv
|
|
|
|
| 15 |
|
| 16 |
|
|
|
|
| 12 |
|
| 13 |
blackbox-recorder
|
| 14 |
python-dotenv
|
| 15 |
+
huggingface_hub
|
| 16 |
|
| 17 |
|