Skip to content

Instantly share code, notes, and snippets.

View jizhang02's full-sized avatar

Jing Zhang jizhang02

View GitHub Profile
@jizhang02
jizhang02 / test000_patient.py
Created November 23, 2022 15:00
opengate test files for simulating vivo radiation therapy
'''
-----------------------------------------------
File Name: test000_test$
Description: test file with opengate on patient
Author: Jing$
Date: 25/10/2022$
-----------------------------------------------
'''
# import libraries
import opengate as gate
@jizhang02
jizhang02 / convert_dcm_to_mhd.py
Created November 16, 2022 11:00
convert dicom files into mhd file
'''
-----------------------------------------------
File Name: convert_dcm_to_mhd$
Description: convert dicom files into mhd file
Author: Jing$
Date: 16/11/2022$
-----------------------------------------------
'''
import os
@jizhang02
jizhang02 / ModelMemory.py
Last active October 4, 2021 14:35
Calculate the theoretical memory of a model in Keras.
'''
-----------------------------------------------
File Name: memory_usage$
Description: memroy usage in theory
Author: Jing$
Reference: https://stackoverflow.com/questions/43137288/how-to-determine-needed-memory-of-keras-model
Date: 9/28/2021$
-----------------------------------------------
'''
def get_model_memory_usage(batch_size, model):
@jizhang02
jizhang02 / grid_data_augmentation.py
Last active August 26, 2021 11:33
Data augmentation with grid search idea. You can generate as many images as you want according to different data augmentation combinations based on grid search.
'''
-----------------------------------------------
File Name: grid search$
Description:
Author: Jing$
Date: 8/23/2021$
-----------------------------------------------
'''
import numpy as np