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
MaskedDenoising
MaskedDenoising-main/data/dataset_video_train.py
import numpy as np import random import torch from pathlib import Path import torch.utils.data as data import utils.utils_video as utils_video class VideoRecurrentTrainDataset(data.Dataset): """Video dataset for training recurrent networks. The keys are generated from a meta info txt file. basicsr/data/...
15,730
39.648579
133
py
MeTS-10
MeTS-10-master/analysis/val02_counters/counters03_explore_madrid_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c] * # language: python # name: conda-env-t4c-py # --- # + from IPython.display impo...
11,590
32.022792
291
py
MeTS-10
MeTS-10-master/analysis/val02_counters/counters03_explore_london_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c] * # language: python # name: conda-env-t4c-py # --- # + from IPython.display impo...
7,783
34.543379
120
py
MeTS-10
MeTS-10-master/analysis/val02_counters/exploration_utils.py
import pandas as pd import numpy as np import folium import geojson import geopandas import osmnx as ox import networkx as nx import seaborn as sns from pathlib import Path from matplotlib import pyplot as plt from datetime import datetime, timedelta MOVIE_BBOXES = { "antwerp": {"bounds": [5100100, 5143700, 41530...
8,512
39.345972
124
py
MeTS-10
MeTS-10-master/analysis/val02_counters/counters01_prepare_data_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c22] # language: python # name: conda-env-t4c22-py # --- # +...
38,277
38.17912
174
py
MeTS-10
MeTS-10-master/analysis/val02_counters/counters03_explore_berlin_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c] * # language: python # name: conda-env-t4c-py # --- # + f...
9,746
34.834559
327
py
MeTS-10
MeTS-10-master/analysis/val02_counters/__init__.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
658
58.909091
89
py
MeTS-10
MeTS-10-master/analysis/val02_counters/exploration_plots_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c] * # language: python # name: conda-env-t4c-py # --- # + f...
15,560
40.830645
137
py
MeTS-10
MeTS-10-master/analysis/val02_counters/counters02_match_counters_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python [conda env:t4c] * # language: python # name: conda-env-t4c-py # --- # + import pandas as pd impor...
11,289
33.845679
118
py
MeTS-10
MeTS-10-master/analysis/val03_meta/meta01_confidence_based_filtering.py
import ast from pathlib import Path import pandas as pd BASEDIR = Path("/iarai/public/t4c/data_pipeline/release20221026_residential_unclassified_no_trust_filtering") def simplified_filter(hw): return hw in [ "motorway", "motorway_link", "trunk", "trunk_link", "primary", ...
3,754
41.191011
147
py
MeTS-10
MeTS-10-master/analysis/val03_meta/meta00_diagonal_vs_horizontal_vertical.py
from pathlib import Path import geopandas as gpd import pandas as pd from shapely import LineString from data_pipeline.data_helpers import get_bearing MARGIN = 10 def main(DATA_ROOT: Path, RELEASE: str, YEAR: str, CITY: str, NUM_SPEED_FILES: int = 10): gdf_edges = gpd.read_parquet(DATA_ROOT / RELEASE / YEAR /...
3,921
35.314815
185
py
MeTS-10
MeTS-10-master/analysis/dataset_description/data_specification.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
2,485
33.054795
99
py
MeTS-10
MeTS-10-master/analysis/dataset_description/city_inventory.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
11,353
45.154472
338
py
MeTS-10
MeTS-10-master/analysis/dataset_description/__init__.py
0
0
0
py
MeTS-10
MeTS-10-master/analysis/dataset_description/speed_stats.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
30,171
42.601156
165
py
MeTS-10
MeTS-10-master/analysis/dataset_description/pyqgis/speed_stats_pyqgis_density_8_18.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
3,570
32.373832
110
py
MeTS-10
MeTS-10-master/analysis/dataset_description/pyqgis/pyqgis_speed_stats_lib.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
3,754
45.358025
121
py
MeTS-10
MeTS-10-master/analysis/dataset_description/pyqgis/speed_stats_pyqgis_road_graph.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
4,128
33.123967
134
py
MeTS-10
MeTS-10-master/analysis/dataset_description/pyqgis/__init__.py
0
0
0
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber03_barcelona_spatial_coverage_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from pathlib import Path import geopan...
12,237
30.541237
149
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber07_temporal-validation-week-barcelona_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from datetime import datetime from path...
20,254
34.410839
156
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber05_speed_differences_summary_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from pathlib im...
11,433
29.654155
160
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber06_gen_latex.py
if __name__ == "__main__": for city in ["barcelona", "berlin", "london"]: print( f""" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{{{city.title()}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
4,203
65.730159
399
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber07_temporal-validation-week-london_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from datetime import datetime from path...
20,289
34.472028
156
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber04_berlin_speed_differences_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.5 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from...
29,603
30.59445
160
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber04_london_speed_differences_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.5 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from...
28,539
30.675916
160
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber07_temporal-validation-single-day_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import os import matplotlib.pyplot as ...
8,223
27.655052
213
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber07_temporal-validation-week-berlin_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from datetime import datetime from path...
20,290
34.535902
156
py
MeTS-10
MeTS-10-master/analysis/val01_uber/__init__.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
658
58.909091
89
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber03_spatial_coverage_city_comparison_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from pathlib import Path import folium...
10,313
29.335294
160
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber03_berlin_spatial_coverage_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from pathlib import Path import geopan...
12,310
31.48285
149
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber03_london_spatial_coverage_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + from pathlib import Path import geopan...
11,902
31.881215
149
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber04_barcelona_speed_differences_nb.py
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.14.5 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from...
26,805
31.374396
160
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/uber02_berlin_match_uber_with_osm_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from collections import defa...
14,688
35.269136
153
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/osm_inventory.py
import warnings from pathlib import Path import osmnx as ox import pandas as pd if __name__ == "__main__": ox.config(use_cache=True, log_console=True) OBASEPATH = Path("/iarai/public/t4c/osm") for f in OBASEPATH.rglob("**/*.graphml"): print(f"loading {f}") # ox.load_graphml(f) for f i...
823
30.692308
95
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/uber02_london_match_uber_with_osm_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from collections import defa...
16,219
36.116705
153
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/uber02_barcelona_match_uber_with_osm_nb.py
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # + import ast from collections import defa...
14,692
35.279012
153
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/__init__.py
0
0
0
py
MeTS-10
MeTS-10-master/analysis/val01_uber/osm/uber01_osm_to_parquet_bypassing_osmnx.py
import argparse import ast import datetime import logging import os import sys import timeit from pathlib import Path import geopandas as gpd import humanize import xmltodict from shapely.geometry import LineString from shapely.geometry import Point # TODO write to geopandas! # https://stackoverflow.com/questions/1...
6,058
35.721212
150
py
MeTS-10
MeTS-10-master/analysis/val01_uber/misc/__init__.py
0
0
0
py
MeTS-10
MeTS-10-master/analysis/val01_uber/misc/csv_to_parquet.py
from pathlib import Path import pandas as pd import pyarrow as pa import pyarrow.parquet as pq if __name__ == "__main__": csv_files = list(Path("/iarai/public/t4c/uber").rglob("*.csv")) for i, csv_f in enumerate(csv_files): parquet_f = csv_f.with_suffix(".parquet") print(f"{i}/{len(csv_files)...
641
29.571429
67
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber/uber_data_inventory_from_csvs.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
857
44.157895
89
py
MeTS-10
MeTS-10-master/analysis/val01_uber/uber/__init__.py
0
0
0
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp02_speed_clusters.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
3,349
46.857143
137
py
MeTS-10
MeTS-10-master/data_pipeline/data_helpers.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
8,034
43.392265
150
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp06_speed_classes.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
2,765
42.904762
127
py
MeTS-10
MeTS-10-master/data_pipeline/road_graph_helpers.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
25,462
33.690736
139
py
MeTS-10
MeTS-10-master/data_pipeline/dp03_road_graph.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
15,319
42.896848
166
py
MeTS-10
MeTS-10-master/data_pipeline/ckmeans.py
# Copied from https://github.com/llimllib/ckmeans, WTFPL license import numpy as np def ssq(j, i, sum_x, sum_x_sq): if j > 0: muji = (sum_x[i] - sum_x[j - 1]) / (i - j + 1) sji = sum_x_sq[i] - sum_x_sq[j - 1] - (i - j + 1) * muji**2 else: sji = sum_x_sq[i] - sum_x[i] ** 2 / (i + 1) ...
3,106
25.109244
83
py
MeTS-10
MeTS-10-master/data_pipeline/dp06_speed_classes.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
13,168
44.254296
175
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp03_road_graph.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
6,212
46.068182
222
py
MeTS-10
MeTS-10-master/data_pipeline/dummy_competition_setup_for_testing.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
22,042
33.988889
154
py
MeTS-10
MeTS-10-master/data_pipeline/dp04_intersecting_cells.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
6,036
38.980132
150
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp04_intersecting_cells.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
2,623
43.474576
125
py
MeTS-10
MeTS-10-master/data_pipeline/dp01_movie_aggregation.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
6,707
41.188679
150
py
MeTS-10
MeTS-10-master/data_pipeline/dp05_free_flow.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
8,843
41.114286
159
py
MeTS-10
MeTS-10-master/data_pipeline/__init__.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
786
48.1875
89
py
MeTS-10
MeTS-10-master/data_pipeline/h5_helpers.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
1,796
40.790698
138
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp05_free_flow.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
3,126
45.671642
140
py
MeTS-10
MeTS-10-master/data_pipeline/test_data_helpers.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
6,712
44.666667
148
py
MeTS-10
MeTS-10-master/data_pipeline/dp02_speed_clusters.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
6,656
37.703488
150
py
MeTS-10
MeTS-10-master/data_pipeline/test_dp01_movie_aggregation.py
# Copyright 2022 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.apache.org/lice...
2,798
48.105263
159
py
LISTA-CPSS
LISTA-CPSS-master/main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : main.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified: 2018-10-13 Main script. Start running model from main.py. """ import os , sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # BE QUIET!!!! # timing import time from datetime import timedelta fr...
16,900
34.807203
84
py
LISTA-CPSS
LISTA-CPSS-master/config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ config.py author: xhchrn chernxh@tamu.edu Set up experiment configuration using argparse library. """ import os import sys import datetime import argparse def str2bool(v): return v.lower() in ( 'true' , '1' ) parser = argparse.ArgumentParser() # Networ...
10,853
38.043165
87
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_cp.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_cp.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified : 2018-10-21 Implementation of Learned ISTA with weight coupling. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import shrink_free from models.LISTA_bas...
3,653
31.336283
80
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified : 2018-10-21 Implementation of Learned ISTA proposed by LeCun et al in 2010. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import shrink from models.LISTA_...
3,968
32.352941
80
py
LISTA-CPSS
LISTA-CPSS-master/models/LAMP.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LAMP.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified: 2018-10-15 Implementation of Learned AMP model. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import shrink_lamp from models.LISTA_base import LISTA_base ...
5,565
32.733333
80
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_cs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_cs.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-21 Implementation of the original Learned ISTA for real world image compressive sensing experiments. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import sh...
4,909
34.071429
83
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_cpss.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_cpss.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-21 Implementation of Learned ISTA with support selection and coupled weights. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import shrink_ss from models.L...
3,942
31.319672
80
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_ss.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_ss.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified : 2018-10-21 Implementation of Learned ISTA with support selection technique. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import shrink_ss from models...
4,187
31.976378
80
py
LISTA-CPSS
LISTA-CPSS-master/models/LIHT_cs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LIHT_cs.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-21 Implementation of the original Learned ISTA for real world image compressive sensing experiments. """ import numpy as np import tensorflow as tf import utils.train from utils.tf import har...
4,832
33.769784
83
py
LISTA-CPSS
LISTA-CPSS-master/models/LIHT.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ LISTA_cpss_corrected.py author: xhchrn chernxh@tamu.edu date : 2018-10-21 Implementation of Learned ISTA with support selection and coupled weights like in LAMP, without setting thresholds to zeros if they are minor to zero. """ import numpy as np import ten...
3,898
31.764706
80
py
LISTA-CPSS
LISTA-CPSS-master/models/__init__.py
0
0
0
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ LISTA_base.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-03 A base class for all LISTA networks. """ import numpy as np import numpy.linalg as la import tensorflow as tf import utils.train class LISTA_base (object): """ Implementation of deep ...
3,389
30.682243
84
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_ss_cs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_ss_cs.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-25 Implementation of Learned ISTA with only support selection real world image compressive sensing experiments. """ import numpy as np import tensorflow as tf import utils.train from util...
5,199
34.37415
83
py
LISTA-CPSS
LISTA-CPSS-master/models/LISTA_cpss_cs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : LISTA_cpss_cs.py author: xhchrn email : chernxh@tamu.edu date : 2018-10-21 Implementation of Learned ISTA with support selection and coupled weights for real world image compressive sensing experiments. """ import numpy as np import tensorflow as tf import u...
4,933
33.992908
80
py
LISTA-CPSS
LISTA-CPSS-master/utils/prob.py
#!/usr/bin/env python # -*- coding:utf-8 -*- """ file : prob.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified: 2018-10-03 Define problem class that is used experiments. """ import os import numpy as np import numpy.linalg as la # import tensorflow as tf from scipy.io import savemat, loadmat class Pro...
6,413
31.558376
84
py
LISTA-CPSS
LISTA-CPSS-master/utils/tf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : utils/tf.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified: 2018-10-04 Utility functions implemented in TensorFlow, including: - shrinkage functions - circular padding - activations - subgradient functions - related functions "...
6,409
26.869565
78
py
LISTA-CPSS
LISTA-CPSS-master/utils/data.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ file : data.py author: Xiaohan Chen email : chernxh@tamu.edu last_modified: 2018-10-16 Utility methods for the real world images compressive sensing experiments. """ import os import glob import numpy as np import tensorflow as tf from PIL import Image from tqdm im...
4,164
32.32
84
py
LISTA-CPSS
LISTA-CPSS-master/utils/__init__.py
0
0
0
py
LISTA-CPSS
LISTA-CPSS-master/utils/train.py
#!/usss;k/bin/env python # -*- coding: utf-8 -*- """ train.py author: xhchrn chernxh@tamu.edu This file includes codes that set up training, do the training actually. """ import sys, os import tensorflow as tf import numpy as np from utils.data import bsd500_cs_inputs def setup_input_sc (test, p, tbs, vbs...
33,750
37.136723
100
py
pbrt-v4
pbrt-v4-master/src/pbrt/pbrt_lldbdataformatters.py
""" LLDB Formatters 1. Load Manually (everytime) use lldb command 'command script import [PATH]/pbrt_lldbdataformatters.py' (without the quotes) 2. Load Automatically (add to ~/.lldbinit) 1) create ~/.lldbinit file if there isn't 2) open ~/.lldbinit 3) add 'command script import [PATH]/pbrt_lldbdatafo...
9,411
33.988848
160
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/equilibrium_u_net.py
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import torch from torch import nn from torch.nn import functional as F class ConvBlock(nn.Module): """ A Convolutional Block that co...
6,704
34.664894
98
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/normalized_equilibrium_u_net.py
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import torch from torch import nn from torch.nn import functional as F from utils.spectral_norm import conv_spectral_norm import utils.spectra...
7,553
38.34375
155
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/twolayer_linear_net.py
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import torch from torch import nn from torch.nn import functional as F class LinearNet(nn.Module): def __init__(self, input_size, bottl...
1,205
29.923077
66
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/resnet.py
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import torch from torch import nn from torch.nn import functional as F import torch import torch.nn as nn class nblock_resnet(nn.Module): ...
1,833
30.62069
81
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/u_net.py
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import torch from torch import nn from torch.nn import functional as F class ConvBlock(nn.Module): """ A Convolutional Block that co...
7,115
36.0625
135
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/networks/__init__.py
0
0
0
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/training/denoiser_training.py
import torch import numpy as np from solvers import new_equilibrium_utils as eq_utils from torch import autograd from utils import cg_utils import gc def train_denoiser(denoising_net, train_dataloader, test_dataloader, measurement_process, optimizer, save_location, loss_function, n_ep...
10,567
44.551724
130
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/training/standard_training.py
import torch import numpy as np def train_solver(solver, train_dataloader, test_dataloader, measurement_process, optimizer, save_location, loss_function, n_epochs, forward_model=None, use_dataparallel=False, device='cpu', scheduler=None, n_blocks=10, ...
6,265
40.496689
89
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/training/new_equilibrium_training.py
import torch import numpy as np from solvers import new_equilibrium_utils as eq_utils from torch import autograd def train_solver(single_iterate_solver, train_dataloader, test_dataloader, measurement_process, optimizer, save_location, loss_function, n_epochs, forward_iterator, iterato...
10,141
45.1
113
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/training/refactor_equilibrium_training.py
import torch import numpy as np from solvers import new_equilibrium_utils as eq_utils from torch import autograd from utils import cg_utils def train_solver(single_iterate_solver, train_dataloader, test_dataloader, measurement_process, optimizer, save_location, loss_function, n_epochs...
16,122
47.272455
130
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/training/equilibrium_training.py
import torch import numpy as np from solvers import equilibrium_utils as eq_utils from torch import autograd def train_solver(single_iterate_solver, train_dataloader, test_dataloader, measurement_process, optimizer, save_location, loss_function, n_epochs, use_datapara...
14,024
44.684039
129
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/fixedpoint/deblur_proxgrad_fixedeta_pre.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim from torchvision import transforms import operators.blurs as blu...
6,779
38.418605
122
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/fixedpoint/mri_grad_fixedeta_pre_and4.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim import operators.singlecoil_mri as mrimodel from operators.opera...
6,531
39.320988
121
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/fixedpoint/mri_prox_fixedeta_pre_and.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim import operators.singlecoil_mri as mrimodel from operators.opera...
6,521
39.259259
121
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/denoising/gaussian_dncnn_norm_denoise.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim from torchvision import transforms import operators.operator as ...
5,275
35.638889
121
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/denoising/gaussian_unet_denoise.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim from torchvision import transforms import operators.operator as ...
4,901
35.044118
121
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/denoising/mri_unet_denoise.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim import operators.operator as lin_operator from operators.operato...
4,447
36.066667
121
py
deep_equilibrium_inverse
deep_equilibrium_inverse-main/scripts/denoising/mri_dncnn_denoise.py
import torch import os import random import sys import argparse sys.path.append('/home-nfs/gilton/learned_iterative_solvers') # sys.path.append('/Users/dgilton/PycharmProjects/learned_iterative_solvers') import torch.nn as nn import torch.optim as optim import operators.operator as lin_operator from operators.operato...
5,199
36.681159
121
py