repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
MENET
MENET-master/light/configuration.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/configuration.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import argparse parser = argparse.ArgumentParser() # Model specification parser.add_argument("--in_channel", type...
5,050
44.918182
157
py
MENET
MENET-master/light/vgg19.py
import inspect import os import time import numpy as np import tensorflow as tf # VGG_MEAN = [103.939, 116.779, 123.68] class Vgg19: def __init__(self, vgg19_npy_path=None): if vgg19_npy_path is None: path = inspect.getfile(Vgg19) path = os.path.abspath(os.path.join(path, os.par...
4,400
35.675
120
py
MENET
MENET-master/light/net.py
# -*- coding: utf-8 -*- # @File : MENET/net.py # @Info : @ TSMC-SIGGRAPH, 2019/8/10 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from configuration import cfg from template import menet_shallow_new, menet_shallow_new_ca from template import menet_shallow_new_edge...
2,110
54.552632
130
py
MENET
MENET-master/light/data_helper.py
# -*- coding: utf-8 -*- # @File : derain_gradnorm_tf/data_helper.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from random import shuffle import h5py import numpy as np from configuration import cfg # from matplotlib imp...
1,905
30.766667
118
py
MENET
MENET-master/light/train.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/train.py # @Info : @ TSMC-SIGGRAPH, 2019/8/10 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os import numpy as np import tensorflow as tf from configuration import cfg from data_helper import get_batch from...
2,689
40.384615
121
py
MENET
MENET-master/light/template/menet_shallow_new_edge_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new cla...
2,524
39.725806
104
py
MENET
MENET-master/light/template/menet_shallow_new_ca.py
# -*- coding: utf-8 -*- # @File : light/net_shallow_new_ca.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cl...
2,722
42.222222
146
py
MENET
MENET-master/light/template/menet_shallow_new_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new # from v...
4,430
47.163043
105
py
MENET
MENET-master/light/template/menet_deep_new_ca_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_deep_new_ca cl...
4,887
53.311111
145
py
MENET
MENET-master/light/template/menet_deep_new_ca_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_deep_new_ca ...
5,208
48.141509
145
py
MENET
MENET-master/light/template/menet_shallow_new_edge_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new cla...
2,278
41.203704
104
py
MENET
MENET-master/light/template/menet_shallow_new_vgg_fixed.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_vgg_fixed.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new from vgg19 i...
1,288
35.828571
93
py
MENET
MENET-master/light/template/menet_shallow_new_ca_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new_ca...
5,223
48.283019
145
py
MENET
MENET-master/light/template/net_base.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_base.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg class ModelBase(object): def __init__(self, mode): ...
6,054
38.575163
122
py
MENET
MENET-master/light/template/menet_shallow_new.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cla...
3,896
49.61039
161
py
MENET
MENET-master/light/template/menet_deep_new_ca.py
# -*- coding: utf-8 -*- # @File : light/net_shallow_new_ca.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cl...
2,718
42.15873
146
py
MENET
MENET-master/light/template/menet_shallow_new_ca_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new_ca ...
4,902
53.477778
145
py
MENET
MENET-master/light/template/menet_shallow_new_edge_fixed.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_fixed.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new class Mod...
1,244
36.727273
96
py
MENET
MENET-master/light/template/menet_shallow_new_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_color_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/26 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new # from ...
4,115
49.814815
105
py
MENET
MENET-master/light/utils/inference_wrapper.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/inference_wrapper.py # @Info : @ TSMC-SIGGRAPH, 2018/7/12 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from net import Model from utils import inference_wrapper_base class InferenceWrapper(inference_wrapper_base...
1,225
29.65
81
py
MENET
MENET-master/light/utils/inference_wrapper_base.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/inference_wrapper_base.py # @Info : @ TSMC-SIGGRAPH, 2018/7/12 # @Desc : refer to google's im2txt # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os.path import tensorflow as tf # pylint: disable=unused-argument cl...
3,683
37.375
88
py
MENET
MENET-master/light/utils/__init__.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/__init__.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -.
202
24.375
81
py
MENET
MENET-master/light/utils/transforms.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/transforms.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : @ sumihui : refer to pytorch # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import numpy as np from PIL import Image class Compose(object): """Composes several...
5,204
33.932886
106
py
MENET
MENET-master/heavy/inference.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/inference.py # @Info : @ TSMC-SIGGRAPH, 2019/5/30 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os from datetime import datetime import cv2 import numpy as np import tensorflow as tf from configuration impo...
2,444
37.809524
119
py
MENET
MENET-master/heavy/build_h5_dataset.py
# -*- coding: utf-8 -*- # @File : derain_gradnorm_tf/build_h5_dataset.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os from random import shuffle import h5py import numpy as np from PIL import Image from configura...
4,172
42.926316
127
py
MENET
MENET-master/heavy/validation.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/validation.py # @Info : @ TSMC-SIGGRAPH, 2019/5/30 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os import platform from datetime import datetime from time import time import numpy as np import tensorflow ...
2,654
31.777778
114
py
MENET
MENET-master/heavy/configuration.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/configuration.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import argparse parser = argparse.ArgumentParser() # Model specification parser.add_argument("--in_channel", type...
5,050
44.918182
157
py
MENET
MENET-master/heavy/vgg19.py
import inspect import os import time import numpy as np import tensorflow as tf # VGG_MEAN = [103.939, 116.779, 123.68] class Vgg19: def __init__(self, vgg19_npy_path=None): if vgg19_npy_path is None: path = inspect.getfile(Vgg19) path = os.path.abspath(os.path.join(path, os.par...
4,400
35.675
120
py
MENET
MENET-master/heavy/net.py
# -*- coding: utf-8 -*- # @File : MENET/net.py # @Info : @ TSMC-SIGGRAPH, 2019/8/10 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from configuration import cfg from template import menet_shallow_new, menet_shallow_new_ca from template import menet_shallow_new_edge...
2,110
54.552632
130
py
MENET
MENET-master/heavy/data_helper.py
# -*- coding: utf-8 -*- # @File : derain_gradnorm_tf/data_helper.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from random import shuffle import h5py import numpy as np from configuration import cfg # from matplotlib imp...
1,977
31.42623
118
py
MENET
MENET-master/heavy/train.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/train.py # @Info : @ TSMC-SIGGRAPH, 2019/8/10 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os import numpy as np import tensorflow as tf from configuration import cfg from data_helper import get_batch from...
2,689
40.384615
121
py
MENET
MENET-master/heavy/template/menet_shallow_new_edge_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new cla...
2,524
39.725806
104
py
MENET
MENET-master/heavy/template/menet_shallow_new_ca.py
# -*- coding: utf-8 -*- # @File : light/net_shallow_new_ca.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cl...
2,722
42.222222
146
py
MENET
MENET-master/heavy/template/menet_shallow_new_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new # from v...
4,430
47.163043
105
py
MENET
MENET-master/heavy/template/menet_deep_new_ca_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_deep_new_ca cl...
4,887
53.311111
145
py
MENET
MENET-master/heavy/template/menet_deep_new_ca_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_deep_new_ca ...
5,208
48.141509
145
py
MENET
MENET-master/heavy/template/menet_shallow_new_edge_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new cla...
2,278
41.203704
104
py
MENET
MENET-master/heavy/template/menet_shallow_new_vgg_fixed.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_vgg_fixed.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new from vgg19 i...
1,288
35.828571
93
py
MENET
MENET-master/heavy/template/menet_shallow_new_ca_edge_gram_gradbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_gradbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new_ca...
5,223
48.283019
145
py
MENET
MENET-master/heavy/template/net_base.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_base.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg class ModelBase(object): def __init__(self, mode): ...
6,054
38.575163
122
py
MENET
MENET-master/heavy/template/menet_shallow_new.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cla...
3,896
49.61039
161
py
MENET
MENET-master/heavy/template/menet_deep_new_ca.py
# -*- coding: utf-8 -*- # @File : light/net_shallow_new_ca.py # @Info : @ TSMC-SIGGRAPH, 2019/11/13 # @Desc : deep model (16 residual blocks), spatial pyramid attention # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from template import net_base cl...
2,718
42.15873
146
py
MENET
MENET-master/heavy/template/menet_shallow_new_ca_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_spa_edge_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new_ca ...
4,902
53.477778
145
py
MENET
MENET-master/heavy/template/menet_shallow_new_edge_fixed.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_shallow_edge_fixed.py # @Info : @ TSMC-SIGGRAPH, 2019/11/15 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new class Mod...
1,244
36.727273
96
py
MENET
MENET-master/heavy/template/menet_shallow_new_edge_gram_lossbalance.py
# -*- coding: utf-8 -*- # @File : derain_feqe_tf/net_deep_color_lossbalance.py # @Info : @ TSMC-SIGGRAPH, 2019/11/26 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import tensorflow as tf from configuration import cfg from template import menet_shallow_new # from ...
4,115
49.814815
105
py
MENET
MENET-master/heavy/utils/inference_wrapper.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/inference_wrapper.py # @Info : @ TSMC-SIGGRAPH, 2018/7/12 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. from net import Model from utils import inference_wrapper_base class InferenceWrapper(inference_wrapper_base...
1,225
29.65
81
py
MENET
MENET-master/heavy/utils/inference_wrapper_base.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/inference_wrapper_base.py # @Info : @ TSMC-SIGGRAPH, 2018/7/12 # @Desc : refer to google's im2txt # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import os.path import tensorflow as tf # pylint: disable=unused-argument cl...
3,683
37.375
88
py
MENET
MENET-master/heavy/utils/__init__.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/__init__.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -.
202
24.375
81
py
MENET
MENET-master/heavy/utils/transforms.py
# -*- coding: utf-8 -*- # @File : derain_wgan_tf/transforms.py # @Info : @ TSMC-SIGGRAPH, 2019/5/29 # @Desc : @ sumihui : refer to pytorch # -.-.. - ... -- -.-. .-.. .- -... .---. -.-- ..- .-.. --- -. --. ..-. .- -. import numpy as np from PIL import Image class Compose(object): """Composes several...
5,204
33.932886
106
py
dMod
dMod-master/PEtabTests/0007/0007.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 7 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,785
24.15493
78
py
dMod
dMod-master/PEtabTests/0009/0009.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 9 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['preeq_c0', 'c0'], 'k1': [0.3, 0.8], }).set_index([CONDITI...
2,008
25.786667
78
py
dMod
dMod-master/PEtabTests/0016/0016.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 16 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.Data...
1,784
24.140845
78
py
dMod
dMod-master/PEtabTests/0008/0008.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 8 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,756
24.838235
78
py
dMod
dMod-master/PEtabTests/0015/0015.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 15 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.Data...
1,807
25.202899
78
py
dMod
dMod-master/PEtabTests/0014/0014.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 14 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.Data...
1,819
25.376812
78
py
dMod
dMod-master/PEtabTests/0005/0005.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 5 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0', 'c1'], 'offset_A': ['offset_A_c0', 'offset_A_c1'], }...
1,888
25.985714
78
py
dMod
dMod-master/PEtabTests/0010/0010.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 10 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['preeq_c0', 'c0'], 'k1': [0.3, 0.8], 'B': [0, 0], })....
1,981
25.078947
78
py
dMod
dMod-master/PEtabTests/0004/0004.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 4 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,797
25.441176
78
py
dMod
dMod-master/PEtabTests/0012/0012.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 12 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], 'compartment': [3], }).set_index([CONDITION_ID]) ...
1,876
25.43662
78
py
dMod
dMod-master/PEtabTests/0011/0011.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 11 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], 'B': [2] }).set_index([CONDITION_ID]) measurement...
1,782
24.471429
78
py
dMod
dMod-master/PEtabTests/0002/0002.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 2 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0', 'c1'], 'a0': [0.8, 0.9] }).set_index([CONDITION_ID])...
1,882
25.521127
78
py
dMod
dMod-master/PEtabTests/0001/0001.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 1 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,732
24.485294
78
py
dMod
dMod-master/PEtabTests/0003/0003.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 3 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,875
25.8
78
py
dMod
dMod-master/PEtabTests/0006/0006.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 6 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
1,811
25.26087
78
py
dMod
dMod-master/PEtabTests/0013/0013.py
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 13 # problem -------------------------------------------------------------------- model = DEFAULT_MODEL_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], 'B': ['par'], }).set_index([CONDITION_ID]) measur...
1,934
25.875
78
py
dMod
dMod-master/inst/code/readData.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg import csv import sys import sympy as spy #from sympy.parsing.sympy_parser import parse_expr from sympy.parsing.sympy_tokenize import tokenize # try/except necessary for R interface (imports automatically and does not find other files) try: f...
5,411
25.271845
95
py
dMod
dMod-master/inst/code/AlyssaPetit_ver1.1.py
# AlyssaPetit version 1.1 # Use with python 3.x import numpy import sympy from sympy import Matrix, simplify, expand, solve from numpy import shape, zeros, concatenate from numpy.linalg import matrix_rank from sympy.parsing.sympy_parser import parse_expr from sympy.matrices import * from sympy.matrices import matrix_m...
39,483
35.491682
176
py
dMod
dMod-master/inst/code/functions_obs.py
from sympy import * from sympy.parsing.sympy_parser import parse_expr try: import readline readlineAvailable = True except: readlineAvailable = False var('epsilon') var('t') #returns a matrix of base vectors of the null space given a matrix in rref #the base vectors are in the columns of the matrix def nullSpac...
1,562
23.421875
74
py
dMod
dMod-master/inst/code/functions.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg import sys import time import numpy as np import sympy as spy from sympy.parsing.sympy_parser import parse_expr # try/except necessary for R interface (imports automatically and does not find other files) try: from polyClass import * except: ...
12,635
26.832599
121
py
dMod
dMod-master/inst/code/sbmlAmiciDmod.py
#!/usr/bin/env python3 # # (c) INCOME Hackathon 2018, Bernried, Daniel^2 # import sys import numpy as np import json try: import amici.sbml_import except: from amici import sbml_import def symengineMatrixToNumpy(x, astype='float'): return np.array(x).reshape(x.shape).astype(astype) def getModelJSON(sbml_...
1,730
28.844828
110
py
dMod
dMod-master/inst/code/AlyssaPetit_ver1.0.py
# AlyssaPetit version 1.0 # Use with python 3.x import numpy import sympy from sympy import Matrix, simplify, expand, solve from numpy import shape, zeros, concatenate from numpy.linalg import matrix_rank from sympy.parsing.sympy_parser import parse_expr from sympy.matrices import * from sympy.matrices import matrix_m...
38,516
34.963585
176
py
dMod
dMod-master/inst/code/checkPredictions.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg import sys import sympy as spy # try/except necessary for R interface (imports automatically and does not find other files) try: from functions import extension_str except: pass def checkPredictions(predictions, predFunctions, infisAll, allV...
2,982
31.78022
92
py
dMod
dMod-master/inst/code/extendObservation.py
from sympy import * from sympy.parsing.sympy_parser import * from sympy.parsing.sympy_tokenize import * def getObservation(observation, variables, stoichiometry, flows, conserved): m = len(variables) inversion = [0]*m stoichiometry = Matrix(len(stoichiometry)/m,m,stoichiometry) stoichiometry = stoichiometry.trans...
4,017
27.7
99
py
dMod
dMod-master/inst/code/polyClass.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg import sympy as spy import numpy as np from copy import deepcopy ### efficient class for polynomial calculations class Apoly: def __init__(self, expr, variables, rs): if expr is None: self.coefs = [] self.exps = [] self.vars = varia...
3,831
27.176471
98
py
dMod
dMod-master/inst/code/buildSystem.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg import sys import sympy as spy import numpy as np from multiprocessing import Queue, Queue, Process # try/except necessary for R interface (imports automatically and does not find other files) try: from functions import * from polyClass impo...
5,837
30.728261
112
py
dMod
dMod-master/inst/code/quasiSteadyStates.py
from sympy import * from numpy import concatenate from numpy.linalg import matrix_rank from sympy.parsing.sympy_parser import * import csv def SolveSymbLES(A,b): dim=shape(A)[0] Asave=A[:] Asave=Matrix(dim, dim, Asave) determinant=Asave.det() if(determinant==0): return([]) result=[] ...
9,482
30.929293
165
py
dMod
dMod-master/inst/code/symmetryDetection.py
# Author: Benjamin Merkt, Physikalisches Institut, Universitaet Freiburg # Version: 0.11 import sys import argparse import time import sympy as spy import scipy.linalg # try/except necessary for R interface which imports automatically after loading try: from readData import * from functions import * from buildSys...
12,218
32.476712
160
py
ARFlow
ARFlow-master/inference.py
import imageio import argparse import numpy as np import matplotlib.pyplot as plt import torch from easydict import EasyDict from torchvision import transforms from transforms import sep_transforms from utils.flow_utils import flow_to_image, resize_flow from utils.torch_utils import restore_model from models.pwclite ...
2,310
29.813333
90
py
ARFlow
ARFlow-master/logger.py
import logging import logging.config import logging.handlers from path import Path def init_logger(level='INFO', log_dir='./', log_name='main_logger', filename='main.log'): logger = logging.getLogger(log_name) fh = logging.handlers.RotatingFileHandler( Path(log_dir) / filename, 'w', 20 * 1024 * 1024...
860
29.75
89
py
ARFlow
ARFlow-master/basic_train.py
import torch from utils.torch_utils import init_seed from datasets.get_dataset import get_dataset from models.get_model import get_model from losses.get_loss import get_loss from trainer.get_trainer import get_trainer def main(cfg, _log): init_seed(cfg.seed) _log.info("=> fetching img pairs.") train_set...
1,854
34.673077
80
py
ARFlow
ARFlow-master/train.py
import json import pprint import datetime import argparse from path import Path from easydict import EasyDict import basic_train from logger import init_logger if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-c', '--config', default='configs/sintel_ft.json') parser.add_...
1,418
27.38
81
py
ARFlow
ARFlow-master/trainer/base_trainer.py
import torch import numpy as np from abc import abstractmethod from tensorboardX import SummaryWriter from utils.torch_utils import bias_parameters, weight_parameters, \ load_checkpoint, save_checkpoint, AdamW class BaseTrainer: """ Base class for all trainers """ def __init__(self, train_loader,...
4,244
34.672269
83
py
ARFlow
ARFlow-master/trainer/kitti_trainer_ar.py
import time import torch import numpy as np from copy import deepcopy from .base_trainer import BaseTrainer from utils.flow_utils import load_flow, evaluate_flow from utils.misc_utils import AverageMeter from transforms.ar_transforms.sp_transfroms import RandomAffineFlow from transforms.ar_transforms.oc_transforms impo...
8,755
40.49763
91
py
ARFlow
ARFlow-master/trainer/sintel_trainer.py
import time import torch from .base_trainer import BaseTrainer from utils.flow_utils import evaluate_flow from utils.misc_utils import AverageMeter class TrainFramework(BaseTrainer): def __init__(self, train_loader, valid_loader, model, loss_func, _log, save_root, config): super(TrainFram...
5,445
37.9
89
py
ARFlow
ARFlow-master/trainer/kitti_trainer.py
import time import torch import numpy as np from .base_trainer import BaseTrainer from utils.flow_utils import load_flow, evaluate_flow from utils.misc_utils import AverageMeter class TrainFramework(BaseTrainer): def __init__(self, train_loader, valid_loader, model, loss_func, _log, save_root, co...
5,884
38.496644
89
py
ARFlow
ARFlow-master/trainer/sintel_trainer_ar.py
import time import torch from copy import deepcopy from .base_trainer import BaseTrainer from utils.flow_utils import evaluate_flow from utils.misc_utils import AverageMeter from transforms.ar_transforms.sp_transfroms import RandomAffineFlow from transforms.ar_transforms.oc_transforms import run_slic_pt, random_crop ...
8,316
40.173267
91
py
ARFlow
ARFlow-master/trainer/get_trainer.py
from . import sintel_trainer, sintel_trainer_ar from . import kitti_trainer, kitti_trainer_ar def get_trainer(name): if name == 'Sintel': TrainFramework = sintel_trainer.TrainFramework elif name == 'Sintel_AR': TrainFramework = sintel_trainer_ar.TrainFramework elif name == 'KITTI': ...
530
28.5
57
py
ARFlow
ARFlow-master/models/pwclite.py
import torch import torch.nn as nn import torch.nn.functional as F from utils.warp_utils import flow_warp from .correlation_package.correlation import Correlation # from .correlation_native import Correlation def conv(in_planes, out_planes, kernel_size=3, stride=1, dilation=1, isReLU=True): if isReLU: ret...
10,680
36.742049
90
py
ARFlow
ARFlow-master/models/correlation_native.py
import torch import torch.nn as nn import torch.nn.functional as F class Correlation(nn.Module): def __init__(self, max_displacement=4, *args, **kwargs): super(Correlation, self).__init__() self.max_displacement = max_displacement self.output_dim = 2 * self.max_displacement + 1 sel...
2,336
28.961538
90
py
ARFlow
ARFlow-master/models/get_model.py
from .pwclite import PWCLite def get_model(cfg): if cfg.type == 'pwclite': model = PWCLite(cfg) else: raise NotImplementedError(cfg.type) return model
180
19.111111
43
py
ARFlow
ARFlow-master/models/correlation_package/correlation.py
import torch from torch.nn.modules.module import Module from torch.autograd import Function import correlation_cuda class CorrelationFunction(Function): def __init__(self, pad_size=3, kernel_size=3, max_displacement=20, stride1=1, stride2=2, corr_multiply=1): super(CorrelationFunction, self).__init__() ...
2,265
34.968254
156
py
ARFlow
ARFlow-master/models/correlation_package/setup.py
#!/usr/bin/env python3 import os import torch from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension cxx_args = ['-std=c++11'] nvcc_args = [ '-gencode', 'arch=compute_50,code=sm_50', '-gencode', 'arch=compute_52,code=sm_52', '-gencode', 'arch=compu...
813
26.133333
105
py
ARFlow
ARFlow-master/models/correlation_package/__init__.py
0
0
0
py
ARFlow
ARFlow-master/datasets/get_dataset.py
import copy from torchvision import transforms from torch.utils.data import ConcatDataset from transforms.co_transforms import get_co_transforms from transforms.ar_transforms.ap_transforms import get_ap_transforms from transforms import sep_transforms from datasets.flow_datasets import SintelRaw, Sintel from datasets....
5,969
47.536585
89
py
ARFlow
ARFlow-master/datasets/flow_datasets.py
import imageio import numpy as np import random from path import Path from abc import abstractmethod, ABCMeta from torch.utils.data import Dataset from utils.flow_utils import load_flow class ImgSeqDataset(Dataset, metaclass=ABCMeta): def __init__(self, root, n_frames, input_transform=None, co_transform=None, ...
10,692
38.3125
90
py
ARFlow
ARFlow-master/utils/misc_utils.py
import collections def update_dict(orig_dict, new_dict): for key, val in new_dict.items(): if isinstance(val, collections.Mapping): tmp = update_dict(orig_dict.get(key, {}), val) orig_dict[key] = tmp else: orig_dict[key] = val return orig_dict class Averag...
1,626
30.288462
77
py
ARFlow
ARFlow-master/utils/warp_utils.py
import torch import torch.nn as nn import torch.nn.functional as F import inspect def mesh_grid(B, H, W): # mesh grid x_base = torch.arange(0, W).repeat(B, H, 1) # BHW y_base = torch.arange(0, H).repeat(B, W, 1).transpose(1, 2) # BHW base_grid = torch.stack([x_base, y_base], 1) # B2HW return b...
3,850
33.079646
106
py
ARFlow
ARFlow-master/utils/flow_utils.py
import torch import cv2 import numpy as np from matplotlib.colors import hsv_to_rgb def load_flow(path): if path.endswith('.png'): # for KITTI which uses 16bit PNG images # see 'https://github.com/ClementPinard/FlowNetPytorch/blob/master/datasets/KITTI.py' # The -1 is here to specify not t...
4,870
38.601626
93
py
ARFlow
ARFlow-master/utils/torch_utils.py
import torch import shutil import torch.nn as nn import torch.nn.functional as F import numpy as np import numbers import random import math from torch.optim import Optimizer def init_seed(seed): torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) np.random.seed(seed) random.seed(seed) def weig...
5,676
34.04321
102
py
ARFlow
ARFlow-master/transforms/co_transforms.py
import numbers import random import numpy as np # from scipy.misc import imresize from skimage.transform import resize as imresize import scipy.ndimage as ndimage def get_co_transforms(aug_args): transforms = [] if aug_args.crop: transforms.append(RandomCrop(aug_args.para_crop)) if aug_args.hflip:...
2,709
32.04878
86
py