a b/templates/examples/test.sh
1
#! /bin/bash
2
3
echo "Running a test: Generate method of this medigan model module."
4
5
echo "If not done already, please download 500.pt file from: https://drive.google.com/file/d/1C9vVPymsKJ5i5gpwQM6cpX0y1G89vcpk/view?usp=sharing"
6
7
echo "1. Creating and activating virtual environment called MMG_env."
8
python3 -m venv MMG_env
9
source MMG_env/bin/activate
10
11
echo "2. Pip install dependencies from requirements.txt"
12
pip install -r requirements.txt
13
14
echo "3. Run the generate function with parameters"
15
python __init__.py 
16
17
python -c "from __init__ import generate; 
18
model_file='500.pt';
19
num_samples=10;
20
output_path='images/';
21
save_images=True;
22
generate(model_file=model_file, num_samples=num_samples, output_path=output_path, save_images=save_images)"
23
24
echo "4. Done. Any errors? Have synthetic images been successfully created in folder /images?"