convergedmachine commited on
Commit
c37da31
·
verified ·
1 Parent(s): d45f581

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +108 -49
README.md CHANGED
@@ -1,83 +1,142 @@
1
- # Refined-RadImageNet Model Card
 
 
 
 
2
 
3
- ## Model Description
4
 
5
- **Refined-RadImageNet** is a collection of pre-trained convolutional neural networks (CNNs) specifically designed for medical imaging applications. These models are trained solely on the RadImageNet dataset, which comprises over 1.35 million annotated CT, MRI, and ultrasound images across various pathologies.
6
 
7
- ## Model Details
8
 
9
- - **Developed by:** [ConvergingMachine](https://github.com/converging-machine)
10
- - **Model type:** Convolutional Neural Networks (ResNet variants)
11
- - **License:** Apache-2.0
12
- - **Finetuned from model:** RadImageNet
 
 
 
 
 
 
 
 
13
 
14
  ## Performance Comparison of ResNet Models
15
 
16
- This table compares the performance of ResNet models pretrained on 2D RadImageNet using regular and Two2Three convolution techniques across various metrics.
17
 
18
- | Model | Precision (macro) | Recall (macro) | F1 Score (macro) | Balanced Accuracy | Average Accuracy |
19
- |------------|-------------------|----------------|------------------|-------------------|------------------|
20
- | ResNet10t | 0.4720 | 0.3848 | 0.3998 | 0.3848 | 0.7981 |
21
- | ResNet18 | 0.5150 | 0.4383 | 0.4545 | 0.4383 | 0.8177 |
22
- | ResNet50 | 0.5563 | 0.4934 | 0.5097 | 0.4934 | 0.8352 |
23
 
 
24
 
 
25
 
26
- ## Usage
27
 
28
- To utilize the Refined-RadImageNet models in your project, follow these steps:
29
 
30
- 1. **Install Git LFS (Large File Storage):**
 
 
 
31
 
32
- ```bash
33
- git lfs install
34
- ```
35
 
36
- 2. **Clone the Repository:**
37
 
38
- ```bash
39
- git clone https://huggingface.co/ogrenenmakine/Refined-RadImagenet source/
40
- ```
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- This command clones the repository into a directory named `source`.
43
 
44
- 3. **Load the Model:**
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- The trained models are implemented using the `timm` library. Here's how to load a model:
47
 
48
- ```python
49
- import timm
50
- model = timm.create_model('resnet10t', num_classes=165)
51
- ```
52
 
53
- Replace `'resnet10t'` with `'resnet18'` or `'resnet50'` as needed.
54
 
55
- ## Dataset
56
 
57
- The RadImageNet dataset includes medical images of 3 modalities, 11 anatomies, and 165 pathologic labels. It is available upon request at [www.radimagenet.com](https://www.radimagenet.com/).
 
 
58
 
59
- ## Citation
60
 
61
- If you use this code or the Refined-RadImageNet models in your research, please cite the following paper:
62
 
63
- ```bibtex
64
- @inproceedings{yavuz2025policy,
65
- title={Policy Gradient-Driven Noise Mask},
66
- author={Yavuz, Mehmet Can and Yang, Yang},
67
- booktitle={International Conference on Pattern Recognition},
68
- pages={414--431},
69
- year={2025},
70
- organization={Springer}
71
- }
72
  ```
73
 
74
- ## License
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
- This project is licensed under the Apache-2.0 License.
77
 
78
- ## Acknowledgements
79
 
80
- Special thanks to the contributors of the [Refined-RadImageNet GitHub repository](https://github.com/converging-machine/Refined-RadImagenet) and the developers of the [RadImageNet dataset](https://github.com/BMEII-AI/RadImageNet).
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  ---
83
  license: cc-by-2.0
 
1
+ ---
2
+ language: en
3
+ ---
4
+
5
+ # Refined RadImageNet - Conversion Tools
6
 
7
+ The RadImageNet dataset is available upon request at [https://www.radimagenet.com/](https://www.radimagenet.com/).
8
 
9
+ This repository provides tools to process the RadImageNet dataset, converting it into a refined and stratified organization suitable for various medical imaging applications.
10
 
11
+ For detailed information, refer to our preprint paper: [Policy Gradient-Driven Noise Mask](https://arxiv.org/abs/2406.14568).
12
 
13
+ If you use this code in your research, please cite our paper:
14
+
15
+ ```bibtex
16
+ @article{yavuz2024policy,
17
+ title={Policy Gradient-Driven Noise Mask},
18
+ author={Yavuz, Mehmet Can and Yang, Yang},
19
+ year={2024},
20
+ eprint={2406.14568},
21
+ archivePrefix={arXiv},
22
+ primaryClass={eess.IV}
23
+ }
24
+ ```
25
 
26
  ## Performance Comparison of ResNet Models
27
 
28
+ This table compares the performance of ResNet models pretrained on 2D RadImageNet using regular and Two2Three convolution techniques across various metrics:
29
 
30
+ | Model | Precision (macro) | Recall (macro) | F1 Score (macro) | Balanced Accuracy | Average Accuracy |
31
+ |-----------|-------------------|----------------|------------------|-------------------|------------------|
32
+ | ResNet10t | 0.4720 | 0.3848 | 0.3998 | 0.3848 | 0.7981 |
33
+ | ResNet18 | 0.5150 | 0.4383 | 0.4545 | 0.4383 | 0.8177 |
34
+ | ResNet50 | 0.5563 | 0.4934 | 0.5097 | 0.4934 | 0.8352 |
35
 
36
+ We recommend adapting the code for benchmarking other models, which can be found here: [https://github.com/pytorch/vision/tree/main/references/classification](https://github.com/pytorch/vision/tree/main/references/classification).
37
 
38
+ ## ResNet Models and Weights
39
 
40
+ The model weights are shared through [https://huggingface.co/convergedmachine/RadImagenet](https://huggingface.co/convergedmachine/RadImagenet).
41
 
42
+ To create a model using the `timm` library:
43
 
44
+ ```python
45
+ import timm
46
+ model = timm.create_model('resnet10t', num_classes=165)
47
+ ```
48
 
49
+ Replace `'resnet10t'` with `'resnet18'` or `'resnet50'` as needed.
 
 
50
 
51
+ ## Folder Structure
52
 
53
+ ```
54
+ correction_masks/
55
+ data/
56
+ weights/
57
+ output/
58
+ source/
59
+ correction_masks.tar.gz
60
+ radimagenet.tar.gz
61
+ RadiologyAI_test.csv
62
+ RadiologyAI_train.csv
63
+ RadiologyAI_val.csv
64
+ process.py
65
+ measure_acc_metrics.py
66
+ ```
67
 
68
+ ### Files & Directories
69
 
70
+ - **correction_masks/**: Contains correction masks for the images.
71
+ - **data/**: Contains the extracted radiology images.
72
+ - **weights/**: Directory for model weights.
73
+ - **output/**: Directory for output files.
74
+ - **source/**: Contains source files and datasets.
75
+ - **correction_masks.tar.gz**: Compressed file containing correction masks.
76
+ - **radimagenet.tar.gz**: Compressed RadImageNet dataset.
77
+ - **RadiologyAI_test.csv**: CSV file for the test dataset.
78
+ - **RadiologyAI_train.csv**: CSV file for the training dataset.
79
+ - **RadiologyAI_val.csv**: CSV file for the validation dataset.
80
+ - **process.py**: Main script to process and organize the RadImageNet files.
81
+ - **measure_acc_metrics.py**: Script to measure accuracy metrics.
82
 
83
+ ## Download Processing Files
84
 
85
+ This repository contains files from the Hugging Face repository `convergedmachine/Refined-RadImagenet`. Follow the instructions below to clone the repository using Git.
 
 
 
86
 
87
+ ### Prerequisites
88
 
89
+ Ensure that Git LFS (Large File Storage) is installed:
90
 
91
+ ```bash
92
+ git lfs install
93
+ ```
94
 
95
+ ### Cloning the Repository
96
 
97
+ To clone the entire repository to your local machine:
98
 
99
+ ```bash
100
+ git clone https://huggingface.co/convergedmachine/Refined-RadImagenet source/
 
 
 
 
 
 
 
101
  ```
102
 
103
+ This command clones all files from the repository into a directory named `source`.
104
+
105
+ ### Notes
106
+
107
+ - Ensure you have sufficient storage space for large files.
108
+ - For more information about this dataset, visit the [Hugging Face page](https://huggingface.co/convergedmachine/Refined-RadImagenet).
109
+
110
+ Feel free to contribute or raise issues if you encounter any problems.
111
+
112
+ ## Usage
113
+
114
+ 1. **Extract the Dataset**:
115
+
116
+ ```bash
117
+ python process.py
118
+ ```
119
+
120
+ Ensure the dataset tar file is located in the `source/` directory. The script will automatically extract it to the `data/` directory.
121
 
122
+ 2. **Process the Images**:
123
 
124
+ The script will read the CSV files, refine the images, and organize them accordingly.
125
 
126
+ ## Dependencies
127
+
128
+ - Python 3.9+
129
+ - pandas
130
+ - OpenCV
131
+ - tarfile
132
+ - tqdm
133
+ - numpy
134
+
135
+ Install the required packages using pip:
136
+
137
+ ```bash
138
+ pip install pandas opencv-python tarfile tqdm numpy
139
+ ```
140
 
141
  ---
142
  license: cc-by-2.0