Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JunshengFu/traffic-light-detector
/ functions
Functions
385 in github.com/JunshengFu/traffic-light-detector
⨍
Functions
385
◇
Types & classes
58
↓ 44 callers
Method
get
Convenience function for accesssing box coordinates. Returns: a numpy array of shape [N, 4] representing box corners
utils/np_box_list.py:82
↓ 26 callers
Method
add_field
Add data to a specified field. Args: field: a string parameter used to speficy a related field to be accessed. field_data: a numpy ar
utils/np_box_list.py:65
↓ 24 callers
Method
get_field
Accesses data associated with the specified field in the box collection. Args: field: a string parameter used to speficy a related field to
utils/np_box_list.py:90
↓ 20 callers
Function
_write_config
Writes a config object to disk.
utils/config_util_test.py:32
↓ 16 callers
Method
add_single_ground_truth_image_info
Adds groundtruth for a single image to be used for evaluation. Args: image_id: A unique string/integer identifier for the image. grou
utils/object_detection_evaluation.py:72
↓ 16 callers
Method
num_boxes
Return number of boxes held in collections.
utils/np_box_list.py:54
↓ 10 callers
Method
has_field
(self, field)
utils/np_box_list.py:62
↓ 9 callers
Method
_compute_tp_fp_for_single_class
Labels boxes detected with the same class from the same image as tp/fp. Args: detected_boxes: A numpy array of shape [N, 4] representing de
utils/per_image_evaluation.py:224
↓ 7 callers
Function
gather
Gather boxes from BoxList according to indices and return new BoxList. By default, Gather returns boxes corresponding to the input index list, as
utils/np_box_list_ops.py:96
↓ 7 callers
Method
get_extra_fields
Return all non-box fields.
utils/np_box_list.py:58
↓ 6 callers
Method
create_colorful_test_image
This function creates an image that can be used to test vis functions. It makes an image composed of four colored rectangles. Returns:
utils/visualization_utils_test.py:36
↓ 6 callers
Method
evaluate
Evaluates detections and returns a dictionary of metrics.
utils/object_detection_evaluation.py:94
↓ 5 callers
Method
_create_variables
(self)
utils/variables_helper_test.py:26
↓ 5 callers
Method
add_single_detected_image_info
Adds detections for a single image to be used for evaluation. Args: image_id: A unique string/integer identifier for the image. detec
utils/object_detection_evaluation.py:83
↓ 5 callers
Method
clear
Clears the state to prepare for a fresh evaluation.
utils/object_detection_evaluation.py:99
↓ 4 callers
Method
__init__
Constructor. Args: categories: A list of dicts, each of which has the following keys - 'id': (required) an integer id uniquely iden
utils/object_detection_evaluation.py:61
↓ 3 callers
Method
_assertOptimizerWithNewLearningRate
Asserts successful updating of all learning rate schemes.
utils/config_util_test.py:153
↓ 3 callers
Method
_compute_cor_loc
Compute CorLoc score for object detection result. Args: detected_boxes: A float numpy array of shape [N, 4], representing N regio
utils/per_image_evaluation.py:102
↓ 3 callers
Function
_is_tensor
Returns a boolean indicating whether the input is a tensor. Args: t: the input to be tested. Returns: a boolean that indicates whether t
utils/shape_utils.py:21
↓ 3 callers
Function
_set_dim_0
Sets the 0-th dimension of the input tensor. Args: t: the input tensor, assuming the rank is at least 1. d0: an integer indicating the 0-th
utils/shape_utils.py:33
↓ 3 callers
Method
add_single_ground_truth_image_info
Adds groundtruth for a single image to be used for evaluation. Args: image_id: A unique string/integer identifier for the image. grou
utils/object_detection_evaluation.py:329
↓ 3 callers
Function
area
Computes area of boxes. Args: boxes: Numpy array with shape [N, 4] holding N boxes Returns: a numpy array with shape [N*1] representing
utils/np_box_ops.py:25
↓ 3 callers
Function
retain_groundtruth
Retains groundtruth by valid indices. Args: tensor_dict: a dictionary of following groundtruth tensors - fields.InputDataFields.groundtru
utils/ops.py:287
↓ 2 callers
Function
_copy_extra_fields
Copies the extra fields of boxlist_to_copy_from to boxlist_to_copy_to. Args: boxlist_to_copy_to: BoxList to which extra fields are copied.
utils/np_box_list_ops.py:537
↓ 2 callers
Method
_create_grads_and_vars
(self)
utils/variables_helper_test.py:67
↓ 2 callers
Method
_generate_label_map
(self, num_classes)
utils/label_map_util_test.py:28
↓ 2 callers
Function
_get_classification_loss
Returns the classification loss for a model.
utils/config_util.py:352
↓ 2 callers
Function
_update_input_path
Updates input configuration to reflect a new input path. The input_config object is updated in place, and hence not returned. Args: input_co
utils/config_util.py:418
↓ 2 callers
Method
add_common_detected
(self)
utils/object_detection_evaluation_test.py:227
↓ 2 callers
Method
compute_object_detection_metrics
Evaluates detections as being tp, fp or ignored from a single image. The evaluation is done in two stages: 1. All detections are matched to
utils/per_image_evaluation.py:49
↓ 2 callers
Method
create_and_add_common_ground_truth
(self)
utils/object_detection_evaluation_test.py:202
↓ 2 callers
Function
draw_bounding_box_on_image
Adds a bounding box to an image. Each string in display_str_list is displayed on a separate line above the bounding box in black text on a rectan
utils/visualization_utils.py:124
↓ 2 callers
Function
draw_bounding_box_on_image
Adds a bounding box to an image. Each string in display_str_list is displayed on a separate line above the bounding box in black text on a rectan
utils/visualization_utils(backup).py:124
↓ 2 callers
Function
expanded_shape
Inserts multiple ones into a shape vector. Inserts an all-1 vector of length num_dims at position start_dim into a shape. Can be combined with tf
utils/ops.py:29
↓ 2 callers
Function
filter_scores_greater_than
Filter to keep only boxes with score exceeding a given threshold. This op keeps the collection of boxes whose corresponding scores are greater th
utils/np_box_list_ops.py:474
↓ 2 callers
Function
filter_variables
Filters out the variables matching the filter_regex. Filter out the variables whose name matches the any of the regular expressions in filter_reg
utils/variables_helper.py:28
↓ 2 callers
Method
get_coordinates
Get corner coordinates of boxes. Returns: a list of 4 1-d numpy arrays [y_min, x_min, y_max, x_max]
utils/np_box_list.py:106
↓ 2 callers
Function
get_optimizer_type
Returns the optimizer type for training. Args: train_config: A train_pb2.TrainConfig. Returns: The type of the optimizer
utils/config_util.py:151
↓ 2 callers
Function
intersection
Compute pairwise intersection areas between boxes. Args: boxes1: a numpy array with shape [N, 4] holding N boxes boxes2: a numpy array with
utils/np_box_ops.py:37
↓ 2 callers
Function
load_labelmap
Loads label map proto. Args: path: path to StringIntLabelMap proto text file. Returns: a StringIntLabelMapProto
utils/label_map_util.py:110
↓ 2 callers
Method
name_scope
(self)
utils/test_utils.py:67
↓ 2 callers
Function
sort_by_field
Sort boxes and associated fields according to a scalar field. A common use case is reordering the boxes according to descending scores. Args:
utils/np_box_list_ops.py:131
↓ 1 callers
Method
_compute_is_aclass_correctly_detected_in_image
Compute CorLoc score for a single class. Args: detected_boxes: A numpy array of shape [N, 4] representing detected box coordinate
utils/per_image_evaluation.py:139
↓ 1 callers
Method
_compute_tp_fp
Labels true/false positives of detections of an image across all classes. Args: detected_boxes: A float numpy array of shape [N, 4], repres
utils/per_image_evaluation.py:166
↓ 1 callers
Method
_create_grads_and_vars
(self)
utils/variables_helper_test.py:106
↓ 1 callers
Method
_is_valid_boxes
Check whether data fullfills the format of N*[ymin, xmin, ymax, xmin]. Args: data: a numpy array of shape [N, 4] representing box coordinat
utils/np_box_list.py:119
↓ 1 callers
Method
_remove_invalid_boxes
(self, detected_boxes, detected_scores, detected_class_labels)
utils/per_image_evaluation.py:217
↓ 1 callers
Function
_update_batch_size
Updates `configs` to reflect the new training batch size. The configs dictionary is updated in place, and hence not returned. Args: configs:
utils/config_util.py:278
↓ 1 callers
Function
_update_classification_localization_weight_ratio
Updates the classification/localization weight loss ratio. Detection models usually define a loss weight for both classification and objectness.
utils/config_util.py:320
↓ 1 callers
Function
_update_eval_steps
Updates `configs` to reflect new number of eval steps per evaluation.
utils/config_util.py:413
↓ 1 callers
Function
_update_focal_loss_alpha
Updates the alpha value for a sigmoid focal loss. The configs dictionary is updated in place, and hence not returned. Args: configs: Diction
utils/config_util.py:387
↓ 1 callers
Function
_update_focal_loss_gamma
Updates the gamma value for a sigmoid focal loss. The configs dictionary is updated in place, and hence not returned. Args: configs: Diction
utils/config_util.py:366
↓ 1 callers
Method
_update_ground_truth_statistics
Update grouth truth statitistics. 1. Difficult boxes are ignored when counting the number of ground truth instances as done in Pascal VOC dev
utils/object_detection_evaluation.py:533
↓ 1 callers
Function
_update_initial_learning_rate
Updates `configs` to reflect the new initial learning rate. The configs dictionary is updated in place, and hence not returned. Args: config
utils/config_util.py:234
↓ 1 callers
Function
_update_label_map_path
Updates the label map path for both train and eval input readers. The configs dictionary is updated in place, and hence not returned. Args:
utils/config_util.py:441
↓ 1 callers
Function
_update_momentum_optimizer_value
Updates `configs` to reflect the new momentum value. Momentum is only supported for RMSPropOptimizer and MomentumOptimizer. For any other optimiz
utils/config_util.py:292
↓ 1 callers
Function
_update_optimizer_with_constant_learning_rate
Adds a new constant learning rate.
utils/config_util_test.py:39
↓ 1 callers
Function
_update_optimizer_with_exponential_decay_learning_rate
Adds a new exponential decay learning rate.
utils/config_util_test.py:45
↓ 1 callers
Function
_update_optimizer_with_manual_step_learning_rate
Adds a learning rate schedule.
utils/config_util_test.py:52
↓ 1 callers
Function
_update_train_steps
Updates `configs` to reflect new number of training steps.
utils/config_util.py:408
↓ 1 callers
Function
_validate_label_map
Checks if a label map is valid. Args: label_map: StringIntLabelMap to validate. Raises: ValueError: if label map is invalid.
utils/label_map_util.py:27
↓ 1 callers
Function
area
Computes area of boxes. Args: boxlist: BoxList holding N boxes Returns: a numpy array with shape [N*1] representing box areas
utils/np_box_list_ops.py:40
↓ 1 callers
Function
clip_tensor
Clips the input tensor along the first dimension up to the length. Args: t: the input tensor, assuming the rank is at least 1. length: a te
utils/shape_utils.py:75
↓ 1 callers
Function
concatenate
Concatenate list of BoxLists. This op concatenates a list of input BoxLists into a larger BoxList. It also handles concatenation of BoxList fiel
utils/np_box_list_ops.py:425
↓ 1 callers
Function
convert_label_map_to_categories
Loads label map proto and returns categories list compatible with eval. This function loads a label map and returns a list of dicts, each of which
utils/label_map_util.py:60
↓ 1 callers
Function
create_category_index
Creates dictionary of COCO compatible categories keyed by category id. Args: categories: a list of dicts, each of which has the following keys:
utils/label_map_util.py:41
↓ 1 callers
Function
detect_red
detect red and yellow :param img: :param Threshold: :return:
main.py:15
↓ 1 callers
Function
detect_traffic_lights
Detect traffic lights and draw bounding boxes around the traffic lights :param PATH_TO_TEST_IMAGES_DIR: testing image directory :param MO
main.py:93
↓ 1 callers
Function
draw_bounding_box_on_image_array
Adds a bounding box to an image (numpy array). Args: image: a numpy array with shape [height, width, 3]. ymin: ymin of bounding box in norm
utils/visualization_utils.py:92
↓ 1 callers
Function
draw_bounding_box_on_image_array
Adds a bounding box to an image (numpy array). Args: image: a numpy array with shape [height, width, 3]. ymin: ymin of bounding box in norm
utils/visualization_utils(backup).py:92
↓ 1 callers
Function
draw_bounding_boxes_on_image
Draws bounding boxes on image. Args: image: a PIL.Image object. boxes: a 2 dimensional numpy array of [N, 4]: (ymin, xmin, ymax, xmax).
utils/visualization_utils.py:226
↓ 1 callers
Function
draw_bounding_boxes_on_image
Draws bounding boxes on image. Args: image: a PIL.Image object. boxes: a 2 dimensional numpy array of [N, 4]: (ymin, xmin, ymax, xmax).
utils/visualization_utils(backup).py:226
↓ 1 callers
Function
draw_keypoints_on_image
Draws keypoints on an image. Args: image: a PIL.Image object. keypoints: a numpy array with shape [num_keypoints, 2]. color: color to d
utils/visualization_utils.py:330
↓ 1 callers
Function
draw_keypoints_on_image
Draws keypoints on an image. Args: image: a PIL.Image object. keypoints: a numpy array with shape [num_keypoints, 2]. color: color to d
utils/visualization_utils(backup).py:330
↓ 1 callers
Function
draw_keypoints_on_image_array
Draws keypoints on an image (numpy array). Args: image: a numpy array with shape [height, width, 3]. keypoints: a numpy array with shape [n
utils/visualization_utils.py:309
↓ 1 callers
Function
draw_keypoints_on_image_array
Draws keypoints on an image (numpy array). Args: image: a numpy array with shape [height, width, 3]. keypoints: a numpy array with shape [n
utils/visualization_utils(backup).py:309
↓ 1 callers
Function
draw_mask_on_image_array
Draws mask on an image. Args: image: uint8 numpy array with shape (img_height, img_height, 3) mask: a uint8 numpy array of shape (img_heigh
utils/visualization_utils.py:358
↓ 1 callers
Function
draw_mask_on_image_array
Draws mask on an image. Args: image: uint8 numpy array with shape (img_height, img_height, 3) mask: a uint8 numpy array of shape (img_heigh
utils/visualization_utils(backup).py:358
↓ 1 callers
Function
get_learning_rate_type
Returns the learning rate type for training. Args: optimizer_config: An optimizer_pb2.Optimizer. Returns: The type of the learning rate.
utils/config_util.py:163
↓ 1 callers
Function
ioa
Computes pairwise intersection-over-area between box collections. Intersection-over-area (ioa) between two boxes box1 and box2 is defined as thei
utils/np_box_list_ops.py:79
↓ 1 callers
Function
load_image_into_numpy_array
(image)
main.py:48
↓ 1 callers
Function
non_max_suppression
Non maximum suppression. This op greedily selects a subset of detection bounding boxes, pruning away boxes that have high IOU (intersection over
utils/np_box_list_ops.py:162
↓ 1 callers
Function
pad_tensor
Pads the input tensor with 0s along the first dimension up to the length. Args: t: the input tensor, assuming the rank is at least 1. lengt
utils/shape_utils.py:49
↓ 1 callers
Function
plot_origin_image
(image_np, boxes, classes, scores, category_index)
main.py:72
↓ 1 callers
Function
read_traffic_lights
(image, boxes, scores, classes, max_boxes_to_draw=20, min_score_thresh=0.5, traffic_ligth_label=10)
main.py:56
↓ 1 callers
Function
scale
Scale box coordinates in x and y dimensions. Args: boxlist: BoxList holding N boxes y_scale: float x_scale: float Returns: boxli
utils/np_box_list_ops.py:309
↓ 1 callers
Function
transform_boxes_relative_to_boxes
(boxes, reference_boxes)
utils/ops.py:678
Method
__init__
Constructs box collection. Args: data: a numpy array of shape [N, 4] representing box coordinates Raises: ValueError: if bbox da
utils/np_box_list.py:33
Method
__init__
Initialized PerImageEvaluation by evaluation parameters. Args: num_groundtruth_classes: Number of ground truth object classes matchin
utils/per_image_evaluation.py:30
Method
__init__
(self, is_training, num_classes)
utils/test_utils.py:45
Method
__init__
Constructor. Args: categories: A list of dicts, each of which has the following keys - 'id': (required) an integer id uniquely iden
utils/object_detection_evaluation.py:107
Method
__init__
(self, categories, matching_iou_threshold=0.5)
utils/object_detection_evaluation.py:270
Method
__init__
(self, categories, matching_iou_threshold=0.5)
utils/object_detection_evaluation.py:293
Method
__init__
Constructor. Args: categories: A list of dicts, each of which has the following keys - 'id': (required) an integer id uniquely iden
utils/object_detection_evaluation.py:309
Method
__init__
(self, num_groundtruth_classes, matching_iou_threshold=0.5, nms_i
utils/object_detection_evaluation.py:388
Method
_decode
(self, rel_codes, anchors)
utils/test_utils.py:38
Method
_encode
(self, boxes, anchors)
utils/test_utils.py:35
Method
_generate
(self, feature_map_shape_list)
utils/test_utils.py:73
Method
_match
(self, similarity_matrix)
utils/test_utils.py:81
Method
_predict
(self, image_features, num_predictions_per_location)
utils/test_utils.py:48
next →
1–100 of 385, ranked by callers