recursionaut commited on
Commit
0f760e6
1 Parent(s): 053fbad

Minor changes (#11)

Browse files

- Update README.md (7bdc4b7d2d6d7e45f9a0d50e8865115bdcea7697)
- Update test_huggingface_mae.py (0b368c3c595e5b9b1d7939b3ae5b0aa22e34bfb6)

Files changed (2) hide show
  1. README.md +5 -3
  2. test_huggingface_mae.py +2 -2
README.md CHANGED
@@ -21,7 +21,7 @@ This model is a [channel-agnostic masked autoencoder](https://openaccess.thecvf.
21
  - **Developed, funded, and shared by:** Recursion
22
  - **Model type:** Vision transformer CA-MAE
23
  - **Image modality:** Optimized for microscopy images from the CellPainting assay
24
- - **License:** Attribution-NonCommercial 4.0 International
25
 
26
 
27
  ### Model Sources
@@ -67,7 +67,7 @@ import torch
67
 
68
  from huggingface_mae import MAEModel
69
 
70
- huggingface_phenombeta_model_dir = "."
71
  # huggingface_modelpath = "recursionpharma/OpenPhenom"
72
 
73
 
@@ -75,7 +75,7 @@ huggingface_phenombeta_model_dir = "."
75
  def huggingface_model():
76
  # Make sure you have the model/config downloaded from https://huggingface.co/recursionpharma/OpenPhenom to this directory
77
  # huggingface-cli download recursionpharma/OpenPhenom --local-dir=.
78
- huggingface_model = MAEModel.from_pretrained(huggingface_phenombeta_model_dir)
79
  huggingface_model.eval()
80
  return huggingface_model
81
 
@@ -96,6 +96,8 @@ def test_model_predict(huggingface_model, C, return_channelwise_embeddings):
96
  assert embeddings.shape == (2, expected_output_dim)
97
  ```
98
 
 
 
99
 
100
  ## Training, evaluation and testing details
101
 
 
21
  - **Developed, funded, and shared by:** Recursion
22
  - **Model type:** Vision transformer CA-MAE
23
  - **Image modality:** Optimized for microscopy images from the CellPainting assay
24
+ - **License:** [Non-Commercial End User License Agreement](https://huggingface.co/recursionpharma/OpenPhenom/blob/main/LICENSE)
25
 
26
 
27
  ### Model Sources
 
67
 
68
  from huggingface_mae import MAEModel
69
 
70
+ huggingface_openphenom_model_dir = "."
71
  # huggingface_modelpath = "recursionpharma/OpenPhenom"
72
 
73
 
 
75
  def huggingface_model():
76
  # Make sure you have the model/config downloaded from https://huggingface.co/recursionpharma/OpenPhenom to this directory
77
  # huggingface-cli download recursionpharma/OpenPhenom --local-dir=.
78
+ huggingface_model = MAEModel.from_pretrained(huggingface_openphenom_model_dir)
79
  huggingface_model.eval()
80
  return huggingface_model
81
 
 
96
  assert embeddings.shape == (2, expected_output_dim)
97
  ```
98
 
99
+ **Note: Currently, the model cannot be loaded via the `AutoModel` available in HuggingFace transformers library**
100
+
101
 
102
  ## Training, evaluation and testing details
103
 
test_huggingface_mae.py CHANGED
@@ -3,7 +3,7 @@ import torch
3
 
4
  from huggingface_mae import MAEModel
5
 
6
- huggingface_phenombeta_model_dir = "."
7
  # huggingface_modelpath = "recursionpharma/test-pb-model"
8
 
9
 
@@ -11,7 +11,7 @@ huggingface_phenombeta_model_dir = "."
11
  def huggingface_model():
12
  # Make sure you have the model/config downloaded from https://huggingface.co/recursionpharma/test-pb-model to this directory
13
  # huggingface-cli download recursionpharma/test-pb-model --local-dir=.
14
- huggingface_model = MAEModel.from_pretrained(huggingface_phenombeta_model_dir)
15
  huggingface_model.eval()
16
  return huggingface_model
17
 
 
3
 
4
  from huggingface_mae import MAEModel
5
 
6
+ huggingface_openphenom_model_dir = "."
7
  # huggingface_modelpath = "recursionpharma/test-pb-model"
8
 
9
 
 
11
  def huggingface_model():
12
  # Make sure you have the model/config downloaded from https://huggingface.co/recursionpharma/test-pb-model to this directory
13
  # huggingface-cli download recursionpharma/test-pb-model --local-dir=.
14
+ huggingface_model = MAEModel.from_pretrained(huggingface_openphenom_model_dir)
15
  huggingface_model.eval()
16
  return huggingface_model
17