Search is not available for this dataset
repo
stringlengths
2
152
⌀
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
mopo
mopo-master/softlearning/policies/gaussian_policy.py
"""GaussianPolicy.""" from collections import OrderedDict import numpy as np import tensorflow as tf import tensorflow_probability as tfp from softlearning.distributions.squash_bijector import SquashBijector from softlearning.models.feedforward import feedforward_model from .base_policy import LatentSpacePolicy SC...
8,809
33.147287
78
py
mopo
mopo-master/softlearning/policies/uniform_policy.py
from collections import OrderedDict import tensorflow as tf from .base_policy import BasePolicy class UniformPolicy(BasePolicy): def __init__(self, input_shapes, output_shape, action_range=(-1.0, 1.0)): super(UniformPolicy, self).__init__() self._Serializable__initialize(locals()) self....
1,887
26.362319
77
py
mopo
mopo-master/softlearning/policies/utils.py
from copy import deepcopy from softlearning.preprocessors.utils import get_preprocessor_from_params def get_gaussian_policy(env, Q, **kwargs): from .gaussian_policy import FeedforwardGaussianPolicy policy = FeedforwardGaussianPolicy( input_shapes=(env.active_observation_shape, ), output_shape...
1,378
25.519231
73
py
mopo
mopo-master/softlearning/preprocessors/__init__.py
0
0
0
py
mopo
mopo-master/softlearning/preprocessors/convnet.py
import tensorflow as tf from softlearning.models.feedforward import feedforward_model from softlearning.utils.keras import PicklableKerasModel def convnet_preprocessor( input_shapes, image_shape, output_size, conv_filters=(32, 32), conv_kernel_sizes=((5, 5), (5, 5)), p...
2,328
28.858974
71
py
mopo
mopo-master/softlearning/preprocessors/utils.py
from copy import deepcopy def get_convnet_preprocessor(observation_shape, name='convnet_preprocessor', **kwargs): from .convnet import convnet_preprocessor preprocessor = convnet_preprocessor( input_shapes=(observation_shape, ), name=name, **kw...
1,654
29.090909
76
py
mopo
mopo-master/softlearning/replay_pools/__init__.py
from .simple_replay_pool import SimpleReplayPool from .extra_policy_info_replay_pool import ExtraPolicyInfoReplayPool from .union_pool import UnionPool from .trajectory_replay_pool import TrajectoryReplayPool
209
41
68
py
mopo
mopo-master/softlearning/replay_pools/extra_policy_info_replay_pool.py
from .simple_replay_pool import SimpleReplayPool class ExtraPolicyInfoReplayPool(SimpleReplayPool): def __init__(self, *args, **kwargs): super(ExtraPolicyInfoReplayPool, self).__init__(*args, **kwargs) fields = { 'raw_actions': { 'shape': self._action_space.shape, ...
515
24.8
72
py
mopo
mopo-master/softlearning/replay_pools/flexible_replay_pool.py
import gzip import pickle import numpy as np from .replay_pool import ReplayPool class FlexibleReplayPool(ReplayPool): def __init__(self, max_size, fields_attrs, obs_filter=False, modify_rew=False): super(FlexibleReplayPool, self).__init__() max_size = int(max_size) self._max_size = max...
6,109
32.944444
139
py
mopo
mopo-master/softlearning/replay_pools/replay_pool.py
import abc class ReplayPool(object): """A class used to save and replay data.""" @abc.abstractmethod def add_sample(self, sample): """Add a transition tuple.""" pass @abc.abstractmethod def terminate_episode(self): """Clean up pool after episode termination.""" pa...
1,036
24.925
77
py
mopo
mopo-master/softlearning/replay_pools/simple_replay_pool.py
from collections import defaultdict import numpy as np from gym.spaces import Box, Dict, Discrete import pdb from .flexible_replay_pool import FlexibleReplayPool def normalize_observation_fields(observation_space, name='observations'): if isinstance(observation_space, Dict): fields = [ norma...
3,348
30.299065
73
py
mopo
mopo-master/softlearning/replay_pools/trajectory_replay_pool.py
from collections import deque import gzip import pickle from itertools import islice import numpy as np from softlearning.utils.numpy import softmax from .replay_pool import ReplayPool def random_int_with_variable_range(mins, maxs): result = np.floor(np.random.uniform(mins, maxs)).astype(int) return result ...
5,429
31.51497
89
py
mopo
mopo-master/softlearning/replay_pools/union_pool.py
import numpy as np from .replay_pool import ReplayPool class UnionPool(ReplayPool): def __init__(self, pools): pool_sizes = np.array([b.size for b in pools]) self._total_size = sum(pool_sizes) self._normalized_pool_sizes = pool_sizes / self._total_size self.pools = pools def...
1,263
27.088889
77
py
mopo
mopo-master/softlearning/replay_pools/utils.py
from copy import deepcopy from . import ( simple_replay_pool, extra_policy_info_replay_pool, union_pool, trajectory_replay_pool) POOL_CLASSES = { 'SimpleReplayPool': simple_replay_pool.SimpleReplayPool, 'TrajectoryReplayPool': trajectory_replay_pool.TrajectoryReplayPool, 'ExtraPolicyInfoR...
945
26.823529
72
py
mopo
mopo-master/softlearning/samplers/__init__.py
from .base_sampler import BaseSampler from .dummy_sampler import DummySampler from .simple_sampler import SimpleSampler from .remote_sampler import RemoteSampler from .extra_policy_info_sampler import ExtraPolicyInfoSampler from .utils import rollout, rollouts
261
36.428571
61
py
mopo
mopo-master/softlearning/samplers/base_sampler.py
from collections import deque, OrderedDict from itertools import islice class BaseSampler(object): def __init__(self, max_path_length, min_pool_size, batch_size, store_last_n_paths=10): self._max_path_length = max_path_length self...
1,904
25.458333
65
py
mopo
mopo-master/softlearning/samplers/dummy_sampler.py
from .base_sampler import BaseSampler class DummySampler(BaseSampler): def __init__(self, batch_size, max_path_length): super(DummySampler, self).__init__( max_path_length=max_path_length, min_pool_size=0, batch_size=batch_size) def sample(self): pass
315
23.307692
52
py
mopo
mopo-master/softlearning/samplers/explore_sampler.py
from collections import defaultdict import numpy as np from .base_sampler import BaseSampler class ExploreSampler(BaseSampler): def __init__(self, **kwargs): super(ExploreSampler, self).__init__(**kwargs) self._path_length = 0 self._path_return = 0 self._current_path = defaultdi...
3,491
31.635514
72
py
mopo
mopo-master/softlearning/samplers/extra_policy_info_sampler.py
"""Sampler that stores raw actions and log pis from policy.""" from collections import defaultdict import numpy as np from .simple_sampler import SimpleSampler class ExtraPolicyInfoSampler(SimpleSampler): def sample(self): if self._current_observation is None: self._current_observation = s...
2,159
33.83871
76
py
mopo
mopo-master/softlearning/samplers/remote_sampler.py
import pickle from collections import OrderedDict import ray import tensorflow as tf import numpy as np from .base_sampler import BaseSampler from .utils import rollout class RemoteSampler(BaseSampler): def __init__(self, **kwargs): super(RemoteSampler, self).__init__(**kwargs) self._remote_en...
3,589
29.683761
76
py
mopo
mopo-master/softlearning/samplers/simple_sampler.py
from collections import defaultdict import numpy as np from .base_sampler import BaseSampler class SimpleSampler(BaseSampler): def __init__(self, **kwargs): super(SimpleSampler, self).__init__(**kwargs) self._path_length = 0 self._path_return = 0 self._current_path = defaultdict...
3,608
31.809091
76
py
mopo
mopo-master/softlearning/samplers/utils.py
from copy import deepcopy import numpy as np from softlearning import replay_pools from . import ( dummy_sampler, extra_policy_info_sampler, remote_sampler, base_sampler, simple_sampler) def get_sampler_from_variant(variant, *args, **kwargs): SAMPLERS = { 'DummySampler': dummy_sample...
2,515
25.765957
64
py
mopo
mopo-master/softlearning/scripts/__init__.py
0
0
0
py
mopo
mopo-master/softlearning/scripts/console_scripts.py
"""A command line interface that exposes softlearning examples to user. This package exposes the functions in examples.instrument module to the user through a cli, which allows seamless runs of examples in different modes (e.g. locally, in google compute engine, or ec2). There are two types of cli commands in this f...
6,645
31.10628
79
py
mopo
mopo-master/softlearning/utils/keras.py
import tempfile import tensorflow as tf class PicklableKerasModel(tf.keras.Model): def __getstate__(self): with tempfile.NamedTemporaryFile(suffix='.hdf5', delete=True) as fd: tf.keras.models.save_model(self, fd.name, overwrite=True) model_str = fd.read() d = {'model_str':...
1,072
31.515152
76
py
mopo
mopo-master/softlearning/utils/numpy.py
import numpy as np def softmax(x): max_x = np.max(x) exp_x = np.exp(x - max_x) return exp_x / np.sum(exp_x)
122
14.375
32
py
mopo
mopo-master/softlearning/value_functions/__init__.py
0
0
0
py
mopo
mopo-master/softlearning/value_functions/utils.py
from copy import deepcopy from softlearning.preprocessors.utils import get_preprocessor_from_params from . import vanilla def create_double_value_function(value_fn, *args, **kwargs): # TODO(hartikainen): The double Q-function should support the same # interface as the regular ones. Implement the double min-t...
1,778
31.944444
73
py
mopo
mopo-master/softlearning/value_functions/value_function.py
import tensorflow as tf import numpy as np from serializable import Serializable class SumQFunction(Serializable): def __init__(self, observation_shape, action_shape, q_functions): self._Serializable__initialize(locals()) self.q_functions = q_fu...
1,833
30.62069
77
py
mopo
mopo-master/softlearning/value_functions/vanilla.py
from softlearning.models.feedforward import feedforward_model def create_feedforward_Q_function(observation_shape, action_shape, *args, observation_preprocessor=None, name='feedforwa...
1,143
32.647059
64
py
MNC
MNC-master/README.md
# Instance-aware Semantic Segmentation via Multi-task Network Cascades By Jifeng Dai, Kaiming He, Jian Sun This python version is re-implemented by [Haozhi Qi](https://github.com/Oh233) when he was an intern at Microsoft Research. ### Introduction MNC is an instance-aware semantic segmentation system based on deep ...
6,766
40.012121
452
md
MNC
MNC-master/data/scripts/fetch_imagenet_models.sh
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} URL="https://onedrive.live.com/download?resid=F371D9563727B96F!91967&authkey=!AKjrYZBFAfb6JBQ" echo "Downloading VGG16.mask.caffemodel model..." mkdir ../imagenet_models/ wget ${URL} -O VGG16.mask.caffemodel mv VGG16.mask.caffemodel ../...
563
24.636364
94
sh
MNC
MNC-master/data/scripts/fetch_mcg_data.sh
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} FILE=MCG-Pascal-Main_trainvaltest_2012-proposals.tgz URL=https://data.vision.ee.ethz.ch/jpont/mcg/${FILE} echo "Downloading MCG proposals data..." wget $URL -O ${FILE} echo "Unzipping..." mkdir tmp tar zxvf ${FILE} -C tmp/ --strip-compo...
427
16.12
55
sh
MNC
MNC-master/data/scripts/fetch_mnc_model.sh
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} URL="https://onedrive.live.com/download?resid=571EABC0F8C2A19C!1103&authkey=!ALXduVujs-7r6Ug" echo "Downloading mnc model..." mkdir ../mnc_model wget ${URL} -O mnc_model.caffemodel.h5 mv mnc_model.caffemodel.h5 ../mnc_model/
309
21.142857
93
sh
MNC
MNC-master/data/scripts/fetch_sbd_data.sh
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} FILE=benchmark.tgz URL=http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/${FILE} echo "Downloading SBD data..." wget $URL -O ${FILE} echo "Unzipping..." mkdir tmp tar zxvf ${FILE} -C tmp/ --strip-compon...
470
19.478261
95
sh
MNC
MNC-master/experiments/cfgs/VGG16/cfm.yml
EXP_DIR: cfm MASK_SIZE: 21 CFM_MODE: True MNC_MODE: False RNG_SEED: 821 TRAIN: HAS_RPN: False IMS_PER_BATCH: 1 SCALES: [480, 576, 688, 864, 1024] MAX_SIZE: 1500 TEST: SCALES: [480, 576, 688, 864, 1024] MAX_SIZE: 1500 GROUP_SCALE: 3 MAX_ROIS_GPU: [2000, 500] USE_TOP_K_MCG: 2000
296
16.470588
36
yml
MNC
MNC-master/experiments/cfgs/VGG16/faster_rcnn_end2end.yml
EXP_DIR: faster_rcnn_end2end MNC_MODE: False TRAIN: MIX_INDEX: False IMS_PER_BATCH: 1 BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True BATCH_SIZE: 128 FG_FRACTION: [0.25] BG_FRACTION: [1.0] BG_THRESH_HI: [0.5] BG_THRESH_LO: [0.1]
238
18.916667
42
yml
MNC
MNC-master/experiments/cfgs/VGG16/mnc_5stage.yml
EXP_DIR: mnc_5stage MASK_SIZE: 21 TRAIN: RPN_POST_NMS_TOP_N: 300 IMS_PER_BATCH: 1 BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True
129
17.571429
42
yml
MNC
MNC-master/experiments/scripts/cfm.sh
#!/bin/bash # Usage: # ./experiments/scripts/cfm.sh GPU NET [--set ...] # Example: # ./experiments/scripts/cfm.sh 0 VGG16 \ # --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]" set -x set -e export PYTHONUNBUFFERED="True" GPU_ID=$1 NET=$2 NET_lc=${NET,,} ITERS=30000 DATASET_TRAIN=voc_2012_seg_train ...
1,157
23.638298
86
sh
MNC
MNC-master/experiments/scripts/faster_rcnn_end2end.sh
#!/bin/bash # Usage: # ./experiments/scripts/faster_rcnn_end2end.sh GPU NET [--set ...] # Example: # ./experiments/scripts/faster_rcnn_end2end.sh 0 VGG16 \ # --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]" set -x set -e export PYTHONUNBUFFERED="True" GPU_ID=$1 NET=$2 NET_lc=${NET,,} ITERS=70000 D...
1,280
25.142857
100
sh
MNC
MNC-master/experiments/scripts/mnc_5stage.sh
#!/bin/bash # Usage: # ./experiments/scripts/mnc_5stage.sh GPU NET [--set ...] # Example: # ./experiments/scripts/mnc_5stage.sh 0 VGG16 \ # --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]" set -x set -e export PYTHONUNBUFFERED="True" GPU_ID=$1 NET=$2 NET_lc=${NET,,} ITERS=25000 DATASET_TRAIN=voc_2...
1,209
24.208333
91
sh
MNC
MNC-master/lib/mnc_config.py
"""MNC config system """ import numpy as np import os.path from easydict import EasyDict as edict __C = edict() cfg = __C # MNC/CFM mode __C.MNC_MODE = True __C.CFM_MODE = False __C.EXP_DIR = 'default' __C.USE_GPU_NMS = True __C.GPU_ID = 0 __C.RNG_SEED = 3 __C.EPS = 1e-14 __C.PIXEL_MEANS = np.array([[[102.9801, 115...
6,958
32.618357
91
py
MNC
MNC-master/lib/setup.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
6,247
36.413174
90
py
MNC
MNC-master/lib/caffeWrapper/SolverWrapper.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- imp...
6,147
43.230216
103
py
MNC
MNC-master/lib/caffeWrapper/TesterWrapper.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
21,633
51.13012
123
py
MNC
MNC-master/lib/caffeWrapper/__init__.py
0
0
0
py
MNC
MNC-master/lib/datasets/__init__.py
0
0
0
py
MNC
MNC-master/lib/datasets/pascal_voc.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
3,522
27.642276
77
py
MNC
MNC-master/lib/datasets/pascal_voc_det.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
13,855
42.435737
134
py
MNC
MNC-master/lib/datasets/pascal_voc_seg.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import cPickle import os import scipy.io as sio import nump...
10,828
46.28821
116
py
MNC
MNC-master/lib/db/__init__.py
0
0
0
py
MNC
MNC-master/lib/db/imdb.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- from...
970
32.482759
88
py
MNC
MNC-master/lib/db/maskdb.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- from mnc_config import cfg from db.imdb import get_imdb d...
1,162
29.605263
71
py
MNC
MNC-master/lib/db/roidb.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
6,862
37.55618
112
py
MNC
MNC-master/lib/nms/__init__.py
0
0
0
py
MNC
MNC-master/lib/nms/gpu_mv.hpp
void _mv(const float* all_boxes, const float* all_masks, const int all_boxes_num, const int* candidate_inds, const int* candidate_start, const float* candidate_weights, const int candidate_num, const int image_height, const int image_width, const int box_dim, const int mask_size, const int result_num, ...
404
80
119
hpp
MNC
MNC-master/lib/nms/gpu_nms.hpp
void _nms(int* keep_out, int* num_out, const float* boxes_host, int boxes_num, int boxes_dim, float nms_overlap_thresh, int device_id);
146
48
78
hpp
MNC
MNC-master/lib/nms/nms_wrapper.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- from...
2,332
31.402778
77
py
MNC
MNC-master/lib/nms/py_cpu_nms.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
1,118
27.692308
77
py
MNC
MNC-master/lib/pylayer/__init__.py
0
0
0
py
MNC
MNC-master/lib/pylayer/anchor_target_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
9,757
40.879828
94
py
MNC
MNC-master/lib/pylayer/cfm_data_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import cv2 import yaml import scipy import numpy as np impo...
11,892
44.39313
122
py
MNC
MNC-master/lib/pylayer/mask_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import caffe import cv2 import numpy as np from transform.m...
3,988
37.728155
124
py
MNC
MNC-master/lib/pylayer/mnc_data_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
5,826
37.589404
103
py
MNC
MNC-master/lib/pylayer/proposal_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
10,386
43.965368
121
py
MNC
MNC-master/lib/pylayer/proposal_target_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
9,255
41.654378
97
py
MNC
MNC-master/lib/pylayer/stage_bridge_layer.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import caffe import numpy as np import yaml from transform....
11,685
44.648438
112
py
MNC
MNC-master/lib/transform/__init__.py
0
0
0
py
MNC
MNC-master/lib/transform/anchors.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
3,927
28.533835
78
py
MNC
MNC-master/lib/transform/bbox_transform.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
6,973
33.186275
97
py
MNC
MNC-master/lib/transform/mask_transform.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import numpy as np import cv2 from mnc_config import cfg fr...
11,105
37.696864
138
py
MNC
MNC-master/lib/utils/__init__.py
0
0
0
py
MNC
MNC-master/lib/utils/bbox.c
/* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython ...
298,577
42.37905
1,009
c
MNC
MNC-master/lib/utils/blob.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- """B...
3,732
33.564815
77
py
MNC
MNC-master/lib/utils/timer.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
1,016
28.911765
77
py
MNC
MNC-master/lib/utils/unmap.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
745
31.434783
77
py
MNC
MNC-master/lib/utils/vis_seg.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import numpy as np import cPickle import os import cv2 from...
5,842
38.47973
104
py
MNC
MNC-master/lib/utils/voc_eval.py
# -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- impo...
13,824
34.088832
124
py
MNC
MNC-master/tools/_init_paths.py
import os.path import sys """ Add lib paths and caffe path to system search path """ def add_path(path): if path not in sys.path: sys.path.insert(0, path) cur_dir = os.path.dirname(__file__) # Add caffe python to PYTHONPATH caffe_path = os.path.join(cur_dir, '..', 'caffe-mnc', 'python') add_path(caffe...
417
17.173913
63
py
MNC
MNC-master/tools/demo.py
#!/usr/bin/python # -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------...
7,538
38.265625
93
py
MNC
MNC-master/tools/prepare_mcg_maskdb.py
# -------------------------------------------------------- # Multitask Network Cascade # Written by Haozhi Qi # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- # System modules import argparse import os import cPickle i...
11,222
42
118
py
MNC
MNC-master/tools/test_net.py
#!/usr/bin/env python # -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # ---------------------------------------...
2,755
31.423529
81
py
MNC
MNC-master/tools/train_net.py
#!/usr/bin/env python # -------------------------------------------------------- # Multitask Network Cascade # Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # Copyright (c) 2016, Haozhi Qi # Licensed under The MIT License [see LICENSE for details] # ---------------------------------------...
3,331
32.656566
78
py
null
AccPPR-main/README.md
# AccPPR ## Overview Welcome to the repository of Accelerating Personalized PageRank Vector Computation! We build this repository to make our proposed algorithm publicly available and reproduce main experimental results shown in our KDD2023 paper. ## Preparation ### Datasets We provide DBLP and Web-Stanford in ./...
1,663
26.733333
317
md
null
AccPPR-main/alg.py
from numba import njit,float64,int32 import numpy as np STEP=1e5 @njit(cache=True) def _forward_push_mean(indptr,indices,degree,s,eps,alpha, debug=False): n = len(degree) queue = np.zeros(n + 1, dtype=np.int32) front, rear = np.int32(0), np.int32(2) gpr_vec, r = np.zeros(n), np.zeros(n + 1) queue[1...
20,200
27.694602
81
py
null
AccPPR-main/demo.py
from alg import (forward_push_mean, forward_push, power_iteration, heavy_ball, nag, power_push, forward_push_sor, power_push_sor) import scipy.sparse as sp import numpy as np method:dict={'forward_push':forward_push, 'forward_push_mean':forward_push_mean, 'power_iteration':power_iteration, ...
825
25.645161
73
py
null
AccPPR-main/environment.yml
name: ppr channels: - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - appdirs=1.4.4=pyhd3eb1b0_0 - asttokens=2.0.5=pyhd3eb1b0_0 - backcall=0.2.0=pyhd3eb1b0_0 - blas=1.0=mkl - brotli=1.0.9=h5eee18b_7 - brotli-bin=1.0.9=h5eee18b_7 - brotlipy=0.7.0=py39h27cfd23_1003 - ca-c...
4,497
30.454545
42
yml
null
AccPPR-main/plots/algo.py
import networkx as nx import numpy as np import numba import scipy.linalg from numba import jit import scipy.sparse as sp from numba import njit, float64, int64, int32, prange import time @njit(cache=True) def _forward_push(indptr, indices, degree, s, eps, alpha): n = degree.shape[0] queue = np.zeros(n, dtype...
76,397
33.045455
118
py
null
AccPPR-main/plots/cal_ppr.py
import argparse import multiprocessing import scipy.sparse as sp import numpy as np from tqdm import tqdm import random import json import time import sys sys.path.append('../') from alg import ( forward_push, power_iteration, heavy_ball, nag, power_push, forward_push_sor, power_push_sor) parser = argparse.ArgumentPa...
2,789
27.469388
85
py
null
AccPPR-main/plots/fig2.py
import numpy as np import matplotlib.pyplot as plt import scipy.sparse as sp from scipy.sparse import csr_matrix from algo import _forward_push_dummy_bound import pickle as pkl import multiprocessing def single_run_bound(para): alpha, num_nodes, dataset, seed = para dblp = np.load(f'../datasets/{dataset}') ...
4,365
37.298246
126
py
null
AccPPR-main/plots/fig3.py
import numpy as np import time from scipy.sparse import csr_matrix from algo import _forward_push_dummy from algo import _forward_push_mean import pickle as pkl import multiprocessing def single_run(para): alpha, num_nodes, eps, dataset, seed = para dblp = np.load(f'../datasets/{dataset}') dblp_a = csr_mat...
5,080
39.325397
99
py
null
AccPPR-main/plots/fig45.py
import json import matplotlib.pyplot as plt import numpy as np markers={'forward_push':'^', 'power_iteration':'o', 'heavy_ball':'<', 'nag':'x', 'power_push':'s', 'forward_push_sor':'v', 'power_push_sor':'h' } indexes=['A','B','C'...
5,808
37.986577
103
py
null
AccPPR-main/plots/fig6.py
import sys sys.path.append('../') from alg import forward_push import scipy.sparse as sp import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm csrs={ 'webs':'../datasets/directed_web-stanford_csr_matrix.npz', 'lj':'../datasets/directed_lj_csr_matrix.npz', 'pokec':'../datasets/directed_pok...
1,713
30.163636
98
py
realistic-ssl-evaluation
realistic-ssl-evaluation-master/CONTRIBUTING.md
# How to Contribute We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow. ## Contributor License Agreement Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your ...
1,100
38.321429
80
md
realistic-ssl-evaluation
realistic-ssl-evaluation-master/README.md
# realistic-ssl-evaluation This repository contains the code for [Realistic Evaluation of Deep Semi-Supervised Learning Algorithms](https://arxiv.org/abs/1804.09170), by Avital Oliver\*, Augustus Odena\*, Colin Raffel\*, Ekin D. Cubuk, and Ian J. Goodfellow, arXiv preprint arXiv:1804.09170. If you use the code in thi...
5,819
58.387755
359
md
realistic-ssl-evaluation
realistic-ssl-evaluation-master/build_label_map.py
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
5,882
34.871951
79
py
realistic-ssl-evaluation
realistic-ssl-evaluation-master/build_tfrecords.py
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
8,865
32.330827
79
py
realistic-ssl-evaluation
realistic-ssl-evaluation-master/convert_imagenet.py
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
1,608
29.358491
79
py
realistic-ssl-evaluation
realistic-ssl-evaluation-master/evaluate_checkpoints.py
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
5,395
31.506024
112
py
realistic-ssl-evaluation
realistic-ssl-evaluation-master/evaluate_model.py
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
12,231
32.883657
86
py