Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a37c33e

Browse files
Update README with StrainNet application and retraining
Added sections for applying StrainNet to experimental images and retraining with experimental data.
1 parent e518cc5 commit a37c33e

1 file changed

Lines changed: 38 additions & 1 deletion

File tree

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ StrainNet is a deep learning based method for predicting strain from images
2222
- [Applying StrainNet to experimental images](#applying-strainnet-to-experimental-images)
2323
- [Arguments](#arguments-2)
2424
- [Applying StrainNet to human flexor tendons *in vivo*](#applying-strainnet-to-human-flexor-tendons-in-vivo)
25+
- [Retraining StrainNet further with experimental images](#retraining-strainnet-further-with-experimental-images)
26+
- [TBD](#tbd)
2527
- [Citation](#citation)
2628
- [TBD](#tbd)
2729
- [LICENSE](#license)
@@ -116,7 +118,7 @@ python train.py --help
116118

117119
Or examine the [`core/arguments.py`](core/arguments.py) Python script.
118120

119-
## Resuming training
121+
## Resuming training on pre-trained models
120122

121123
You can also resume training on models for StrainNet by specifying the `--resume` flag and the path to the pre-trained model. For example:
122124

@@ -190,6 +192,41 @@ To run the `eval.sh` script, simply execute the following command from the termi
190192
. scripts/eval.sh
191193
```
192194

195+
# Applying StrainNet to experimental images
196+
197+
To apply StrainNet to experimental images that do not have known strains, you can use the apply2experimental.py script. This script loads the trained StrainNet model and processes the experimental images to predict the strains.
198+
199+
To apply StrainNet to experimental images, use the following command:
200+
201+
```
202+
python apply2experimental.py --model path/to/trained/model --experimental-data path/to/experimental/data
203+
```
204+
Replace path/to/trained/model with the actual path to the trained StrainNet model, and path/to/experimental/data with the actual path to the experimental data.
205+
206+
The apply2experimental.py script will output the predicted strains to the terminal and/or save them to a file, depending on the specified command line arguments.
207+
208+
## Arguments
209+
210+
You can see a list of all the available arguments for the apply2experimental.py script by using the --help flag:
211+
212+
```
213+
python apply2experimental.py --help
214+
```
215+
Note: The apply2experimental.py script requires the experimental images to be in a specific format that is compatible with StrainNet.
216+
217+
## Applying StrainNet to human flexor tendons in vivo
218+
219+
To apply the pretrained models real experimental data, you can use the flexor_tendon.sh script. This script will invoke the necessary scripts and pass the appropriate arguments to them.
220+
221+
To run the flexor_tendon.sh script, simply execute the following command from the terminal:
222+
223+
```
224+
. scripts/flexor_tendon.sh
225+
```
226+
227+
# Retraining StrainNet further with experimental images
228+
To train StrainNet further on experimental images
229+
193230
# Citation
194231

195232
```

0 commit comments

Comments
 (0)