Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/copy_file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: copy_file

on: workflow_dispatch
# push:
# branches:
# - master

jobs:
copy-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Pushes file
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: './documentation/data/website.yml'
destination_repo: 'GSTT-CSC/gstt-csc.github.io'
destination_folder: '_projects'
#email and username of the user associated with the token
user_email: ''
user_name: ''
commit_message: ''
61 changes: 61 additions & 0 deletions .github/workflows/render_and_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# make sure main_image_path in website.yml is correct
name: render_and_push

# left as manual for testing, to be changed to on push
on: workflow_dispatch
# push:
# branches:
# - main

jobs:
update-and-copy-md:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: render md and graphs
# set up environment, render website_modelcard.md with yml data in data directory, and plot demographics data
# NOTE to fix - currently fails if demo_graphs dir already exists in repo AND has files in
run: |
python -m venv testenv
. testenv/bin/activate
pip install --upgrade pip
pip install rdm
pip install matplotlib
pip install pillow
cd ./documentation
make ./release/website_modelcard.md
mkdir ../md-to-send
mv ./release/website_modelcard.md ../md-to-send/${GITHUB_REPOSITORY#*/}_modelcard.md
mkdir demo_graphs
python plotyml.py
- name: Pushes md
uses: SpinyOwl/publish-artifact-to-git@1.0.1
with:
# need to create a personal access token with read/write access to website repo, and save it to secrets. access tokens expire after 60 days.
# a user based naming convention for secrets may be necessary, to ensure each user calls their own access token (if multiple access tokens saved to a repo's secrets)
github_pat: '${{ secrets.MODEL_CARD_DEMO }}'
repository: GSTT-CSC/gstt-csc.github.io
# sending to branch for testing, to be changed to main/master
branch: 228_add_modelcard_layout
# source folder path needs to match the md-to-send directory created in render md and graphs step above
source_folder: ./md-to-send
# set target folder in website repo for modelcard md file
target_folder: _projects
no_delete: true
- name: Pushes graphs
uses: SpinyOwl/publish-artifact-to-git@1.0.1
with:
github_pat: '${{ secrets.MODEL_CARD_DEMO }}'
repository: GSTT-CSC/gstt-csc.github.io
# sending to branch for testing, to be changed to main/master
branch: 228_add_modelcard_layout
# source folder path needs to match the demo_graphs directory created in render md and graphs step above
source_folder: ./documentation/demo_graphs
target_folder: assets/img/projects
no_delete: true

# works but get this Warning: The `set-output` command is deprecated and will be disabled soon...
# Please upgrade to using Environment Files...
# For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
# link says command disable is postponed because of high use
30 changes: 29 additions & 1 deletion documentation/data/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ name: "DEVICE"
# Shorthand Name for device, (max 5 characters)
name_sh: "DEV"

statement_of_purpose: PURPOSE

summary: SUMMARY

modality: MODALITY

pathology: PATHOLOGY

rationale: RATIONALE

patient_pathway: PATHWAY

# The current release number for the device
version: "v0.1.0"

Expand All @@ -22,9 +34,25 @@ safety_class: B
# "III" -
mhra_class: "IIb"

# link ot the website page
# link to the website page
csc_website_url:

#the GitHub URL
github_url:

#path to logo
logo:

# Name of or department that approved the project
Project_approver:

#
Approval_date:

#is project service development (bool)
Service_Dev:

#expected completion date
exp_comp_date:


42 changes: 42 additions & 0 deletions documentation/data/documents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- document: proposal
version:
- document: software_req_spec
version:
- document: hazard_log
version:
- document: software_design_spec
version:
- document: design_plan
version:
- document: verif_and_validation_plan
version:
- document: user_acceptance_criteria
version:
- document: support_agreement
version:
- document: post_deployment_surveillance_plan
version:
- document: clinical_safety_case_report
version:
- document: clinical_risk_management_plan
version:
- document: cyber_security
version:
- document: revision_level_history
version:
- document: risk_management_report
version:
- document: software_description
version:
- document: software_development_and_maintenance_rec
version:
- document: software_plan
version:
- document: software_release_activity_record
version:
- document: test_record
version:
- document: unresolved_anomalies
version:
- document: data_description
version:
12 changes: 12 additions & 0 deletions documentation/data/model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
model_architecture: "model"

MLFlow artefacts:
# will this path be in project or website repo or elsewhere?
- image: path/to/performance_image1.png
description: "text description"
- image: image2.png
description: "text description"

model_version: "v2.0"
date:
pytorch_version:
14 changes: 14 additions & 0 deletions documentation/data/roles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- role: clinical lead
people:
- role: Clinical Safety Officer
people:
- role: csc_development_lead
people:
- role: csc_ml_lead
people:
- role: stakeholder
people:
- role: hod_for_deployment
people:
- role: staff_training_lead
people:
47 changes: 44 additions & 3 deletions documentation/data/training_data.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
xnat_project_name:
xnat_project_name: NAME

dataset_version:
dataset_version: VERSION

preprocess_description:
preprocess_description: DESCRIPTION

train_dataset_summary: DATASET SUMMARY
train_data_excl: Exclusion Criteria
train_dataset_size: SIZE
train_input: Images

train_dataset:
- total:
subgroups:
- gender:
Female: 10
Male: 10
- ethnicity:
Not Stated:
Asian:
Black:
Latin American:
Mixed:
White:
- Age:
0-15:
16-20:
21-25:
26-30:
31-35:
36-40:
41-45:
46-50:
51-55:
56-60:
61-65:
66-70:
71-75:
76-80:
81-85:
86-90:
91+:
- positive:
subgroups:
- postive_female_mixed:
subgroups:
- age:


test_dataset:

Expand Down
13 changes: 13 additions & 0 deletions documentation/data/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
project_title: PROJECT TITLE
status: Developing

# image path in website repo
main_image_path: /assets/img/projects/IMAGE_TITLE.jpg

# logo path in website repo
logo: path/to/logo

errors: ERRORS
goals: GOALS
success_criteria: CRITERIA

35 changes: 35 additions & 0 deletions documentation/documents/website_modelcard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: modelcard
title: {{website.project_title}}
devicename: {{device.name}}
status: {{website.status}}
image: {{website.main_image_path}}
sex_graph: /assets/img/projects/{{device.name}}_sex_graph.png
ethn_graph: /assets/img/projects/{{device.name}}_ethn_graph.png
age_graph: /assets/img/projects/{{device.name}}_age_graph.png
summary: {{device.summary}}
modality: {{device.modality}}
model: {{model.model_architecture}}
pathology: {{device.pathology}}
rationale: {{device.rationale}}
patient-pathway: {{device.patient_pathway}}
training-data: {{training_data.train_dataset_summary}}
train_data_excl: {{training_data.train_data_excl}}
train_input: {{training_data.train_input}}
train_size: {{training_data.train_dataset_size}}
errors: {{website.errors}}
goals: {{website.goals}}
success-criteria: {{website.success_criteria}}

alternatives: <a href="http://www.gleamer.ai/">Gleamer</a>, which specialise in trauma x-rays, has been considered for this purpose but was decided not suitable to solve this particular clinical problem. The decision was made to train an in-house algorithm instead.




---

**Project Plan**
<br> 1. Meeting of all persons involved to determine AI specifications. <br><br> 2. Setting technical and system requirements for AI model. <br> 3. Dataset curation (retrospective). <br><br> 4. Model training<br><br>5. Model testing <br><br>6. Implementation <br><br>7. Audit
<br>
<br>
<b>References</b>:<br>
30 changes: 30 additions & 0 deletions documentation/documents/website_project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: project_page
title: {{website.project_title}}
status: {{website.status}}
image: {{website.main_image_path}}
summary: {{device.summary}}
modality: {{device.modality}}
pathology: {{device.pathology}}
rationale: {{device.rationale}}
patient-pathway: {{device.patient_pathway}}
training-data: {{training_data.train_dataset.summary}}
errors: {{website.errors}}
goals: {{website.goals}}
success-criteria: {{website.success_criteria}}

csc-lead: <a href="/team_member/Dika.html">Dika</a>
alternatives: <a href="http://www.gleamer.ai/">Gleamer</a>, which specialise in trauma x-rays, has been considered for this purpose but was decided not suitable to solve this particular clinical problem. The decision was made to train an in-house algorithm instead

---
MRI imaging is superior in identification of occult carpal fracture, but is not always accessible. Imaging from X-rays can give suboptimal views, and the presentation of arthritis can make small fractures difficult to see. An AI tool to aide clinical diagnosis of occult carpal fractures using x-rays would increase diagnostic sensitivity in areas and situations where MRI is not available.
A computer aided diagnosis tool which would automatically run when either a scaphoid fracture is suspected or if a patient is referred for a hand/wrist x-ray from A&E would increase sensitivity and confidence of diagnosis. Carpal fractures can be difficult to identify and patients with high clinical suspicion are put in a splint and referred to the fracture clinic even if a fracture isn’t seen on the x-ray by the clinician. Subtle lucency of an un-displaced fracture and the significance of a small bone fragment is currently easily missed. A successful tool would therefore increase diagnostic confidence and accuracy and reduce repeated x-rays and needless fracture clinic referrals
<br>
<br>
<b>Clinical lead</b>: {% for r in roles %}{% if r.role == "clinical lead" %}{{r.people | join('<br>, ')}}{% endif %}{% endfor %} <br>
<br>
**Project Plan** <br>
<strike>1. Meeting of all persons involved to determine AI specifications. <br><br> 2. Setting technical and system requirements for AI model. </strike> <br> 3. Dataset curation (retrospective). <br><br> 4. Model training<br><br>5. Model testing <br><br>6. Implementation <br><br>7. Audit
<br>
<br>
<b>References</b>:<br> <a href="https://online.boneandjoint.org.uk/doi/full/10.1302/0301-620X.101B8.BJJ-2018-1590.R1"> TOHETI trial results </a>
Loading