Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pretrained #10

Open
06Liz opened this issue Jun 21, 2024 · 5 comments
Open

pretrained #10

06Liz opened this issue Jun 21, 2024 · 5 comments

Comments

@06Liz
Copy link

06Liz commented Jun 21, 2024

const.py文件中,import os
from pathlib import Path

Use environment variables to auto-detect whether we are running an a Compute Canada cluster:

Thanks to https://github.com/DM-Berger/unet-learn/blob/master/src/train/load.py for this trick.

COMPUTECANADA = False
TMP = os.environ.get("SLURM_TMPDIR")

if TMP:
COMPUTECANADA = True

if COMPUTECANADA:
INPUT_FOLDER = Path(str(TMP)).resolve() / "work" / "inputs"
MASK_FOLDER = Path(str(TMP)).resolve() / "work" / "inputs" / "masks"
PRETRAINED_MODEL_FOLDER = Path(str(TMP)).resolve() / "work" / "trained_models"
PRETRAINED_MODEL_DDPM_PATH = (
Path(str(TMP)).resolve() / "work" / "trained_models" / "ddpm"
)
PRETRAINED_MODEL_VAE_PATH = (
Path(str(TMP)).resolve() / "work" / "trained_models" / "vae"
)
PRETRAINED_MODEL_DECODER_PATH = (
Path(str(TMP)).resolve() / "work" / "trained_models" / "decoder"
)
PRETRAINED_MODEL_VGG_PATH = (
Path(str(TMP)).resolve() / "work" / "trained_models" / "vgg16.pt"
)
OUTPUT_FOLDER = Path(str(TMP)).resolve() / "work" / "outputs"
else:
INPUT_FOLDER = Path(file).resolve().parent.parent.parent / "data" / "IXI"
MASK_FOLDER = Path(file).resolve().parent.parent / "masks"
OASIS_FOLDER = Path(file).resolve().parent.parent.parent / "data" / "OASIS"
PRETRAINED_MODEL_FOLDER = (
Path(file).resolve().parent.parent.parent / "data" / "trained_models"
)这些预训练的模型都在哪里啊,数据在哪啊?

@06Liz
Copy link
Author

06Liz commented Jun 21, 2024

而且那个链接也打不开

@jueqiw
Copy link
Member

jueqiw commented Jun 25, 2024

Thanks for your interest in our work! The weight for the pre-trained model could be found in https://drive.google.com/drive/folders/110l68um6gUJzECIv0AyF-4Fcw0rrQgA9?usp=drive_link

Please don't hesitate to let me know if you have future questions!

@06Liz
Copy link
Author

06Liz commented Jun 25, 2024

Thanks for your answer and your contribution.

@06Liz
Copy link
Author

06Liz commented Jun 26, 2024

with open(
    "/scratch/j/jlevman/jueqi/thesis_experiments/decoder/result_decoder_downsample_2.csv",
    "a",
) as file:
    writer = csv.writer(file)
    writer.writerow(row)

return latent_vector_out

@wendy-xiaozong
Where is the /scratch/j/jlevman/jueqi/thesis_experiments/decoder/result_decoder_downsample_2.csv?

@jueqiw
Copy link
Member

jueqiw commented Jun 26, 2024

It's an output file that I used to save the result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants