kenobi commited on
Commit
6b7b7e9
·
verified ·
1 Parent(s): fc90964

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +95 -3
README.md CHANGED
@@ -19,17 +19,109 @@ model-index:
19
  value: 0.8050341606140137
20
  ---
21
 
22
- # NASA_GeneLab_MBT
23
 
24
  NASA GeneLab VisionTransformer on BPS Microscopy Data
25
 
26
  ## Example Images
27
 
28
-
29
  #### High_Energy_Ion_Fe_Nuclei
30
 
31
  ![High_Energy_Ion_Fe_Nuclei](images/High_Energy_Ion_Fe_Nuclei)
32
 
33
  #### XRay_irradiated_Nuclei
34
 
35
- ![XRay_irradiated_Nuclei](images/XRay_irradiated_Nuclei)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  value: 0.8050341606140137
20
  ---
21
 
22
+ # NASA GeneLab VisionTransformer on BPS Microscopy Data
23
 
24
  NASA GeneLab VisionTransformer on BPS Microscopy Data
25
 
26
  ## Example Images
27
 
 
28
  #### High_Energy_Ion_Fe_Nuclei
29
 
30
  ![High_Energy_Ion_Fe_Nuclei](images/High_Energy_Ion_Fe_Nuclei)
31
 
32
  #### XRay_irradiated_Nuclei
33
 
34
+ ![XRay_irradiated_Nuclei](images/XRay_irradiated_Nuclei)
35
+
36
+ ## Authors:
37
+ [Frank Soboczenski](https://h21k.github.io/), University of York & King's College London, UK<br>
38
+ [tba]
39
+ [tba]
40
+ [tba]
41
+
42
+ ## General:
43
+ This Vision Transformer model has been fine-tuned on Solar Dynamics Observatory (SDO) data. The images used are available here:
44
+ [Solar Dynamics Observatory Gallery](https://sdo.gsfc.nasa.gov/gallery/main). This is a Vision Transformer model fine-tuned on SDO data in an active region classification task. We aim to highlight the ease of use of the HuggingFace platform, integration with popular deep learning frameworks such as PyTorch, TensorFlow, or JAX, performance monitoring with Weights and Biases, and the ability to effortlessly utilize pre-trained large scale Transformer models for targeted fine-tuning purposes. This is to our knowledge the first Vision Transformer model on NASA SDO mission data and we are working on additional versions to address challenges in this domain.
45
+
46
+ <b>The data used was provided courtesy of NASA/SDO and the AIA, EVE, and HMI science teams.
47
+ The authors gratefully acknowledge the entire NASA Solar Dynamics Observatory Mission Team.</b><br>
48
+
49
+ For the SDO team: this model is the first version for demonstration purposes. It is only trained on the SDO Gallery data atm and we're working on additional data.
50
+
51
+ We will include more technical details here soon.
52
+
53
+ ## Example Images
54
+ --> Use one of the images below for the inference API field on the upper right.
55
+
56
+ Additional images for testing can be found at:
57
+ [Solar Dynamics Observatory Gallery](https://sdo.gsfc.nasa.gov/gallery/main)
58
+
59
+ ### NASA_SDO_Coronal_Hole
60
+
61
+ ![NASA_SDO_Coronal_Hole](images/NASA_SDO_Coronal_Hole2.jpg)
62
+
63
+ ### NASA_SDO_Coronal_Loop
64
+
65
+ ![NASA_SDO_Coronal_Loop](images/NASA_SDO_Coronal_Loop.jpg)
66
+
67
+ ## Training data
68
+ The ViT model was pretrained on a dataset consisting of 14 million images and 21k classes ([ImageNet-21k](http://www.image-net.org/).
69
+ More information on the base model used can be found here: (https://huggingface.co/google/vit-base-patch16-224-in21k)
70
+
71
+ ## How to use this Model
72
+ (quick snippet to work on Google Colab - comment the pip install for local use if you have transformers already installed)
73
+
74
+ ```python
75
+ !pip install transformers --quiet
76
+ from transformers import AutoFeatureExtractor, AutoModelForImageClassification
77
+ from PIL import Image
78
+ import requests
79
+
80
+ url = 'https://sdo.gsfc.nasa.gov/assets/gallery/preview/211_coronalhole.jpg'
81
+ image = Image.open(requests.get(url, stream=True).raw)
82
+
83
+ feature_extractor = AutoFeatureExtractor.from_pretrained("kenobi/SDO_VT1")
84
+ model = AutoModelForImageClassification.from_pretrained("kenobi/SDO_VT1")
85
+ inputs = feature_extractor(images=image, return_tensors="pt")
86
+
87
+ outputs = model(**inputs)
88
+ logits = outputs.logits
89
+ # model predicts one of the three fine-tuned classes (NASA_SDO_Coronal_Hole, NASA_SDO_Coronal_Loop or NASA_SDO_Solar_Flare)
90
+ predicted_class_idx = logits.argmax(-1).item()
91
+ print("Predicted class:", model.config.id2label[predicted_class_idx])
92
+ ```
93
+
94
+ ## BibTeX & References
95
+
96
+ A publication on this work is currently in preparation. In the meantime, please refer to this model by using the following citation:
97
+
98
+ For the base ViT model used please refer to:
99
+
100
+ ```bibtex
101
+ @misc{wu2020visual,
102
+ title={Visual Transformers: Token-based Image Representation and Processing for Computer Vision},
103
+ author={Bichen Wu and Chenfeng Xu and Xiaoliang Dai and Alvin Wan and Peizhao Zhang and Zhicheng Yan and Masayoshi Tomizuka and Joseph Gonzalez and Kurt Keutzer and Peter Vajda},
104
+ year={2020},
105
+ eprint={2006.03677},
106
+ archivePrefix={arXiv},
107
+ primaryClass={cs.CV}
108
+ }
109
+ ```
110
+ For referring to Imagenet:
111
+
112
+ ```bibtex
113
+ @inproceedings{deng2009imagenet,
114
+ title={Imagenet: A large-scale hierarchical image database},
115
+ author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li},
116
+ booktitle={2009 IEEE conference on computer vision and pattern recognition},
117
+ pages={248--255},
118
+ year={2009},
119
+ organization={Ieee}
120
+ }
121
+ ```
122
+
123
+
124
+
125
+
126
+
127
+