Skip to content

x-raydar/x-raydar-nlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Raydar Official Repository

x-raydar

Development of a freely accessible deep learning platform for comprehensive chest X-ray reading: a retrospective multicenter study in the UK

The code in this repository refers to the paper published on "The Lancet Digital Health" journal.

Testing the model

NOTE: This is not for clinical use

  1. Clone this repository
  2. Register on x-raydar official webpage and accept our terms and conditions
  3. Download the network weights for the NLP system
    1. add robertax1.0.pt into src/model/
    2. add pytorch_model.bin into src/model/robertax_pretrained/
  4. Use the DICOM in \demo_data to test the model

In order to download the pretrained network weights you will need to first register on

  https://www.x-raydar.info/

and accept our terms and conditions.

Code Example

model, tokenizer = predict.build_model()
filename = '../demo_data/test1.txt'

with open(filename) as file:
    report = file.read()
    input_ids, attention_masks = predict.doc_to_torch([report], tokenizer)
    predictions = predict.main(input_ids, attention_masks, model)

Authors

About

The official repository for the x-raydar NLP code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published