repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/augmenter.py | interfuser/timm/data/augmenter.py | import imgaug as ia
from imgaug import augmenters as iaa
def augment(prob=0.2):
augmenter = iaa.Sequential([
iaa.Sometimes(prob, iaa.GaussianBlur((0, 0.5))),
iaa.Sometimes(prob, iaa.AdditiveGaussianNoise(loc=0, scale=(0., 0.05*255), per_channel=0.5)),
iaa.Sometimes(prob, iaa.Dropout((0.01, ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/config.py | interfuser/timm/data/config.py | import logging
from .constants import *
_logger = logging.getLogger(__name__)
def resolve_data_config(
args, default_cfg={}, model=None, use_test_size=False, verbose=False
):
new_config = {}
default_cfg = default_cfg
if not default_cfg and model is not None and hasattr(model, "default_cfg"):
... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/__init__.py | interfuser/timm/data/__init__.py | from .auto_augment import (
RandAugment,
AutoAugment,
rand_augment_ops,
auto_augment_policy,
rand_augment_transform,
auto_augment_transform,
)
from .config import resolve_data_config
from .constants import *
from .dataset import ImageDataset, IterableImageDataset, AugMixDataset
from .dataset_fac... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/carla_dataset.py | interfuser/timm/data/carla_dataset.py | import os
import copy
import re
import io
import logging
import json
import numpy as np
import torch
import torch.utils.data as data
from torchvision import transforms
from PIL import Image
from .base_io_dataset import BaseIODataset
from .heatmap_utils import generate_heatmap, generate_future_waypoints, get_actor_pos
f... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/dataset_factory.py | interfuser/timm/data/dataset_factory.py | import os
from .dataset import IterableImageDataset, ImageDataset
from .carla_dataset import CarlaMVDetDataset
def _search_split(root, split):
# look for sub-folder with name of split in root and use that if it exists
split_name = split.split("[")[0]
try_root = os.path.join(root, split_name)
if os.pa... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/mixup.py | interfuser/timm/data/mixup.py | """ Mixup and Cutmix
Papers:
mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (https://arxiv.org/abs/1905.04899)
Code Reference:
CutMix: https://github.com/clovaai/CutMix-PyTorch
Hacked together by / Co... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/random_erasing.py | interfuser/timm/data/random_erasing.py | """ Random Erasing (Cutout)
Originally inspired by impl at https://github.com/zhunzhong07/Random-Erasing, Apache 2.0
Copyright Zhun Zhong & Liang Zheng
Hacked together by / Copyright 2020 Ross Wightman
"""
import random
import math
import torch
def _get_pixels(per_pixel, rand_color, patch_size, dtype=torch.float32,... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/transforms.py | interfuser/timm/data/transforms.py | import torch
import torchvision.transforms.functional as F
from PIL import Image
import warnings
import math
import random
import numpy as np
class ToNumpy:
def __call__(self, pil_img):
np_img = np.array(pil_img, dtype=np.uint8)
if np_img.ndim < 3:
np_img = np.expand_dims(np_img, axis=... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/tf_preprocessing.py | interfuser/timm/data/tf_preprocessing.py | """ Tensorflow Preprocessing Adapter
Allows use of Tensorflow preprocessing pipeline in PyTorch Transform
Copyright of original Tensorflow code below.
Hacked together by / Copyright 2020 Ross Wightman
"""
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser_tfds.py | interfuser/timm/data/parsers/parser_tfds.py | """ Dataset parser interface that wraps TFDS datasets
Wraps many (most?) TFDS image-classification datasets
from https://github.com/tensorflow/datasets
https://www.tensorflow.org/datasets/catalog/overview#image_classification
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
import io
import math
import... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/constants.py | interfuser/timm/data/parsers/constants.py | IMG_EXTENSIONS = (".png", ".jpg", ".jpeg")
| python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser_image_folder.py | interfuser/timm/data/parsers/parser_image_folder.py | """ A dataset parser that reads images from folders
Folders are scannerd recursively to find image files. Labels are based
on the folder hierarchy, just leaf folders by default.
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
from timm.utils.misc import natural_key
from .parser import Parser
from .c... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser.py | interfuser/timm/data/parsers/parser.py | from abc import abstractmethod
class Parser:
def __init__(self):
pass
@abstractmethod
def _filename(self, index, basename=False, absolute=False):
pass
def filename(self, index, basename=False, absolute=False):
return self._filename(index, basename=basename, absolute=absolute)... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser_image_tar.py | interfuser/timm/data/parsers/parser_image_tar.py | """ A dataset parser that reads single tarfile based datasets
This parser can read datasets consisting if a single tarfile containing images.
I am planning to deprecated it in favour of ParerImageInTar.
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
import tarfile
from .parser import Parser
from .cl... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser_image_in_tar.py | interfuser/timm/data/parsers/parser_image_in_tar.py | """ A dataset parser that reads tarfile based datasets
This parser can read and extract image samples from:
* a single tar of image files
* a folder of multiple tarfiles containing imagefiles
* a tar of tars containing image files
Labels are based on the combined folder and/or tar name structure.
Hacked together by ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/class_map.py | interfuser/timm/data/parsers/class_map.py | import os
def load_class_map(filename, root=""):
class_map_path = filename
if not os.path.exists(class_map_path):
class_map_path = os.path.join(root, filename)
assert os.path.exists(class_map_path), (
"Cannot locate specified class map file (%s)" % filename
)
class_map_... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/__init__.py | interfuser/timm/data/parsers/__init__.py | from .parser_factory import create_parser
| python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/timm/data/parsers/parser_factory.py | interfuser/timm/data/parsers/parser_factory.py | import os
from .parser_image_folder import ParserImageFolder
from .parser_image_tar import ParserImageTar
from .parser_image_in_tar import ParserImageInTar
def create_parser(name, root, split="train", **kwargs):
name = name.lower()
name = name.split("/", 2)
prefix = ""
if len(name) > 1:
prefi... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/interfuser/docs/models/.templates/generate_readmes.py | interfuser/docs/models/.templates/generate_readmes.py | """
Run this script to generate the model-index files in `models` from the templates in `.templates/models`.
"""
import argparse
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
import modelindex
def generate_readmes(templates_path: Path, dest_path: Path):
"""Add the code snippet templ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/no_rendering_mode.py | scenario_runner/no_rendering_mode.py | #!/usr/bin/env python
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# Allows visualising a 2D map generated by vehicles.
"""
Welcome to CARLA No... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | true |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/metrics_manager.py | scenario_runner/metrics_manager.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# Allows the execution of user-implemented metrics
"""
Welcome to the Scenar... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/manual_control.py | scenario_runner/manual_control.py | #!/usr/bin/env python
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# Allows controlling a vehicle with a keyboard. For a simpler and more
# docu... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/scenario_runner.py | scenario_runner/scenario_runner.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Welcome to CARLA scenario_runner
This is the main script to be executed when running a scenario.
It loads the scenario configura... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/__init__.py | scenario_runner/srunner/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/scenario_helper.py | scenario_runner/srunner/tools/scenario_helper.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Summary of useful helper functions for scenarios
"""
import math
import shapely.geometry
import shapely.affinity
import numpy as np
... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/openscenario_parser.py | scenario_runner/srunner/tools/openscenario_parser.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a parser for scenario configuration files based on OpenSCENARIO
"""
from distutils.util import strtobool
im... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | true |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/route_manipulation.py | scenario_runner/srunner/tools/route_manipulation.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: German Ros (german.ros@intel.com), Felipe Codevilla (felipe.alcm@gmail.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Module to manipulate the routes, by making then m... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/scenario_parser.py | scenario_runner/srunner/tools/scenario_parser.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides access to a scenario configuration parser
"""
import glob
import os
import xml.etree.ElementTree as ET
from sru... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/__init__.py | scenario_runner/srunner/tools/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/py_trees_port.py | scenario_runner/srunner/tools/py_trees_port.py | #!/usr/bin/env python
# Copyright (c) 2015 Daniel Stonier
# Copyright (c) 2020 Intel Corporation
#
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
"""
This module provides a backport from newer py_trees releases (> 1.0)
To use certain features also within ScenarioRunner,... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/tools/route_parser.py | scenario_runner/srunner/tools/route_parser.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Module used to parse all the route and scenario configuration parameters.
"""
import json
import math
import xml.etree.ElementTree as ET
import carla
from agents.navigation.... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/junction_crossing_route.py | scenario_runner/srunner/scenarios/junction_crossing_route.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
All intersection related scenarios that are part of a route.
"""
from __future__ import print_function
import py_trees
from sr... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/master_scenario.py | scenario_runner/srunner/scenarios/master_scenario.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Basic CARLA Autonomous Driving training scenario
"""
import py_trees
from srunner.scenarioconfigs.route_scenario_configuration import RouteConfiguration
from srunner.scena... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/freeride.py | scenario_runner/srunner/scenarios/freeride.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Simple freeride scenario. No action, no triggers. Ego vehicle can simply cruise around.
"""
import py_trees
from srunner.scenar... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/signalized_junction_right_turn.py | scenario_runner/srunner/scenarios/signalized_junction_right_turn.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Collection of traffic scenarios where the ego vehicle (hero)
is making a right turn
"""
from __future__ import print_function
import sys
import py_trees
import carla
fro... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/signalized_junction_left_turn.py | scenario_runner/srunner/scenarios/signalized_junction_left_turn.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Collection of traffic scenarios where the ego vehicle (hero)
is making a left turn
"""
from six.moves.queue import Queue # pylint: disable=relative-import
import py_trees... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/no_signal_junction_crossing.py | scenario_runner/srunner/scenarios/no_signal_junction_crossing.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Non-signalized junctions: crossing negotiation:
The hero vehicle is passing through a junction without traffic lights
And encounters another vehicle passing across the junc... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/follow_leading_vehicle.py | scenario_runner/srunner/scenarios/follow_leading_vehicle.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Follow leading vehicle scenario:
The scenario realizes a common driving behavior, in which the
user-controlled ego vehicle follo... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/object_crash_vehicle.py | scenario_runner/srunner/scenarios/object_crash_vehicle.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Object crash without prior vehicle action scenario:
The scenario realizes the user controlled ego vehicle
moving along the road and encountering a cyclist ahead.
"""
from __fu... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/object_crash_intersection.py | scenario_runner/srunner/scenarios/object_crash_intersection.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Object crash with prior vehicle action scenario:
The scenario realizes the user controlled ego vehicle
moving along the road and encounters a cyclist ahead after taking a rig... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/open_scenario.py | scenario_runner/srunner/scenarios/open_scenario.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Basic scenario class using the OpenSCENARIO definition
"""
from __future__ import print_function
import itertools
import py_tre... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/route_scenario.py | scenario_runner/srunner/scenarios/route_scenario.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides Challenge routes as standalone scenarios
"""
from __future__ import print_function
import math
import trac... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/background_activity.py | scenario_runner/srunner/scenarios/background_activity.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Scenario spawning elements to make the town dynamic and interesting
"""
import carla
from srunner.scenariomanager.carla_data_provider import CarlaDataProvider
from srunner.... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/opposite_vehicle_taking_priority.py | scenario_runner/srunner/scenarios/opposite_vehicle_taking_priority.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Scenarios in which another (opposite) vehicle 'illegally' takes
priority, e.g. by running a red traffic light.
"""
from __future... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/__init__.py | scenario_runner/srunner/scenarios/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/change_lane.py | scenario_runner/srunner/scenarios/change_lane.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Change lane scenario:
The scenario realizes a driving behavior, in which the user-controlled ego vehicle
follows a fast driving ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/control_loss.py | scenario_runner/srunner/scenarios/control_loss.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Control Loss Vehicle scenario:
The scenario realizes that the vehicle looses control due to
bad road conditions, etc. and checks to see if the vehicle
regains control and c... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/basic_scenario.py | scenario_runner/srunner/scenarios/basic_scenario.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provide BasicScenario, the basic class of all the scenarios.
"""
from __future__ import print_function
import opera... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/cut_in.py | scenario_runner/srunner/scenarios/cut_in.py | #!/usr/bin/env python
# Copyright (c) 2019-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Cut in scenario:
The scenario realizes a driving behavior on the highway.
The user-controlled ego vehicle is driving straight an... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/maneuver_opposite_direction.py | scenario_runner/srunner/scenarios/maneuver_opposite_direction.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Vehicle Maneuvering In Opposite Direction:
Vehicle is passing another vehicle in a rural area, in daylight, under clear
weather conditions, at a non-junction and encroaches i... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarios/other_leading_vehicle.py | scenario_runner/srunner/scenarios/other_leading_vehicle.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Other Leading Vehicle scenario:
The scenario realizes a common driving behavior, in which the
user-controlled ego vehicle follows a leading car driving down
a given road. A... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/tools/metrics_parser.py | scenario_runner/srunner/metrics/tools/metrics_parser.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Support class of the MetricsManager to parse the information of
the CARLA... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/tools/metrics_log.py | scenario_runner/srunner/metrics/tools/metrics_log.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Support class of the MetricsManager to query the information available
to... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/examples/criteria_filter.py | scenario_runner/srunner/metrics/examples/criteria_filter.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This metric filters the useful information of the criteria (sucess / fail... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/examples/distance_between_vehicles.py | scenario_runner/srunner/metrics/examples/distance_between_vehicles.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This metric calculates the distance between the ego vehicle and
another a... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/examples/distance_to_lane_center.py | scenario_runner/srunner/metrics/examples/distance_to_lane_center.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This metric calculates the distance between the ego vehicle and
the cente... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/metrics/examples/basic_metric.py | scenario_runner/srunner/metrics/examples/basic_metric.py | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provide BasicMetric, the basic class of all the metrics.
"""
... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/npc_agent.py | scenario_runner/srunner/autoagents/npc_agent.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an NPC agent to control the ego vehicle
"""
from __future__ import print_function
import carla
from agents.navigation.basic_agent import BasicAgent
fro... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/agent_wrapper.py | scenario_runner/srunner/autoagents/agent_wrapper.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Wrapper for autonomous agents required for tracking and checking of used sensors
"""
from __future__ import print_function
import ca... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/ros_agent.py | scenario_runner/srunner/autoagents/ros_agent.py | #!/usr/bin/env python
#
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
"""
This module provides a ROS autonomous agent interface to control the ego vehicle via a ROS stack
"""
import math
import os
import ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/human_agent.py | scenario_runner/srunner/autoagents/human_agent.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a human agent to control the ego vehicle via keyboard
"""
import time
from threading import Thread
import cv2
import numpy as np
try:
import pygame
... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/sensor_interface.py | scenario_runner/srunner/autoagents/sensor_interface.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This file containts CallBack class and SensorInterface, responsible of
handling the use of sensors for the agents
"""
import copy
import logging
import numpy as np
import ca... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/__init__.py | scenario_runner/srunner/autoagents/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/dummy_agent.py | scenario_runner/srunner/autoagents/dummy_agent.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a dummy agent to control the ego vehicle
"""
from __future__ import print_function
import carla
from srunner.autoagents.autonomous_agent import Autonom... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/autoagents/autonomous_agent.py | scenario_runner/srunner/autoagents/autonomous_agent.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the base class for all autonomous agents
"""
from __future__ import print_function
import carla
from srunner.autoagents.sensor_interface import SensorI... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarioconfigs/route_scenario_configuration.py | scenario_runner/srunner/scenarioconfigs/route_scenario_configuration.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the key configuration parameters for a route-based scenario
"""
import carla
from agents.navigation.local_planne... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarioconfigs/openscenario_configuration.py | scenario_runner/srunner/scenarioconfigs/openscenario_configuration.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the key configuration parameters for a scenario based on OpenSCENARIO
"""
import logging
import os
import xml.et... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarioconfigs/__init__.py | scenario_runner/srunner/scenarioconfigs/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenarioconfigs/scenario_configuration.py | scenario_runner/srunner/scenarioconfigs/scenario_configuration.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the key configuration parameters for an XML-based scenario
"""
import carla
class ActorConfigurationData(objec... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/watchdog.py | scenario_runner/srunner/scenariomanager/watchdog.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a simple watchdog timer to detect timeouts
It is for example used in the ScenarioManager
"""
from __future__ impo... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/weather_sim.py | scenario_runner/srunner/scenariomanager/weather_sim.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a weather class and py_trees behavior
to simulate weather in CARLA according to the astronomic
behavior of the su... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/timer.py | scenario_runner/srunner/scenariomanager/timer.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides access to the CARLA game time and contains a py_trees
timeout behavior using the CARLA game time
"""
import... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/traffic_events.py | scenario_runner/srunner/scenariomanager/traffic_events.py | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Collection of TrafficEvents
"""
from enum import Enum
class TrafficEventType(Enum):
"""
This enum represents different traffic events that occur during driving.
... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/carla_data_provider.py | scenario_runner/srunner/scenariomanager/carla_data_provider.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all frequently used data from CARLA via
local buffers to avoid blocking calls to CARLA
"""
from __future__ ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/__init__.py | scenario_runner/srunner/scenariomanager/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/result_writer.py | scenario_runner/srunner/scenariomanager/result_writer.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module contains the result gatherer and write for CARLA scenarios.
It shall be used from the ScenarioManager only.
"""
from... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/scenario_manager.py | scenario_runner/srunner/scenariomanager/scenario_manager.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the ScenarioManager implementation.
It must not be modified and is for reference only!
"""
from __future__ ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/basic_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/basic_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the base class for user-defined actor
controllers. All user-defined controls must be derived from
this class.
A ... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/simple_vehicle_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/simple_vehicle_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example control for vehicles which
does not use CARLA's vehicle engine.
Limitations:
- Does not respect any t... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/external_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/external_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example controller for actors, that use an external
software for longitudinal and lateral control command calc... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/vehicle_longitudinal_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/vehicle_longitudinal_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example longitudinal control for vehicles
"""
import math
import carla
from srunner.scenariomanager.actorco... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/__init__.py | scenario_runner/srunner/scenariomanager/actorcontrols/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example control for vehicles
"""
import math
import carla
from agents.navigation.basic_agent import LocalPla... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/pedestrian_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/pedestrian_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example control for pedestrians
"""
import math
import carla
from srunner.scenariomanager.actorcontrols.bas... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/actorcontrols/actor_control.py | scenario_runner/srunner/scenariomanager/actorcontrols/actor_control.py | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a wrapper to access/use user-defined actor
controls for example to realize OpenSCENARIO controllers.
At the mome... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_behaviors.py | scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_behaviors.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all atomic scenario behaviors required to realize
complex, realistic scenarios such as "follow a leading veh... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | true |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_criteria.py | scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_criteria.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all atomic evaluation criteria required to analyze if a
scenario was completed successfully or failed.
Crit... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | true |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/scenarioatomics/__init__.py | scenario_runner/srunner/scenariomanager/scenarioatomics/__init__.py | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false | |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_trigger_conditions.py | scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_trigger_conditions.py | #!/usr/bin/env python
# Copyright (c) 2018-2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all atomic scenario behaviors that reflect
trigger conditions to either activate another behavior, or to sto... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | true |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/dataset/generate_index.py | dataset/generate_index.py | import os
import random
import shutil
# town01 short
# town02 tiny
random.seed(2023)
root_path = os.getcwd()
weather_list = ["weather-%d"%(i) for i in range(21)]
weather_list = ["weather-%d"%(i) for i in [0,2,3,5]]
town_list = ['town01','town02','town03','town04','town05','town06','town07','town10']
frames_cnt = 0... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/dataset/init_dir.py | dataset/init_dir.py | import os
for i in range(21):
if not os.path.exists("weather-%d" % i):
os.mkdir("weather-%d" % i)
if not os.path.exists("weather-%d/results" % i):
os.mkdir("weather-%d/results" % i)
| python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/dataset/batch_rm_data.py | dataset/batch_rm_data.py | import sys
import os
name = sys.argv[1]
for i in range(21):
subs = os.listdir("weather-%d/data" % i)
for sub in subs:
if name not in sub:
continue
os.system("rm -rf " + os.path.join("weather-%d" % i, "data", sub))
print("delete", os.path.join("weather-%d" % i, "data", sub))
| python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/data_collection/generate_bashs.py | data_collection/generate_bashs.py | import os
import random
routes = {}
routes[
"training_routes/routes_town01_short.xml"
] = "scenarios/town01_all_scenarios.json"
routes["training_routes/routes_town01_tiny.xml"] = "scenarios/town01_all_scenarios.json"
routes[
"training_routes/routes_town02_short.xml"
] = "scenarios/town02_all_scenarios.json"
ro... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/data_collection/generate_yamls.py | data_collection/generate_yamls.py | import yaml
import os
d = {}
d[
"waypoint_disturb"
] = 0.2 # in meters, a way of data augumentaion that randomly distrub the planned waypoints
d["waypoint_disturb_seed"] = 2020
d["destory_hazard_actors"] = True
d["save_skip_frames"] = 10 # skip 10 frames equals fps = 2
d["rgb_only"] = False
if not os.path.exist... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
tulerfeng/PlanKD | https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/data_collection/generate_batch_collect.py | data_collection/generate_batch_collect.py | import os
routes = {}
routes[
"training_routes/routes_town01_short.xml"
] = "scenarios/town01_all_scenarios.json"
routes["training_routes/routes_town01_tiny.xml"] = "scenarios/town01_all_scenarios.json"
routes[
"training_routes/routes_town02_short.xml"
] = "scenarios/town02_all_scenarios.json"
routes["training... | python | Apache-2.0 | 7b6f542ad2b173f20d8baa0f78f83f652065d5ff | 2026-01-05T07:09:10.481895Z | false |
BogiHsu/Tacotron2-PyTorch | https://github.com/BogiHsu/Tacotron2-PyTorch/blob/b1761fd7660e56adf39f3c8d02852fbaec1da2c5/train.py | train.py | import os
import time
import torch
import argparse
import numpy as np
from inference import infer
from utils.util import mode
from hparams import hparams as hps
from utils.logger import Tacotron2Logger
from utils.dataset import ljdataset, ljcollate
from model.model import Tacotron2, Tacotron2Loss
from torch.utils.data ... | python | MIT | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | 2026-01-05T07:09:14.162722Z | false |
BogiHsu/Tacotron2-PyTorch | https://github.com/BogiHsu/Tacotron2-PyTorch/blob/b1761fd7660e56adf39f3c8d02852fbaec1da2c5/inference.py | inference.py | import torch
import argparse
import numpy as np
import matplotlib.pylab as plt
from text import text_to_sequence
from model.model import Tacotron2
from hparams import hparams as hps
from utils.util import mode, to_arr
from utils.audio import save_wav, inv_melspectrogram
def load_model(ckpt_pth):
ckpt_dict = torch... | python | MIT | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | 2026-01-05T07:09:14.162722Z | false |
BogiHsu/Tacotron2-PyTorch | https://github.com/BogiHsu/Tacotron2-PyTorch/blob/b1761fd7660e56adf39f3c8d02852fbaec1da2c5/mkgta.py | mkgta.py | import os
import torch
import argparse
import numpy as np
import matplotlib.pylab as plt
from text import text_to_sequence
from model.model import Tacotron2
from hparams import hparams as hps
from utils.util import mode, to_var, to_arr
from utils.audio import load_wav, save_wav, melspectrogram
def files_to_list(fdir ... | python | MIT | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | 2026-01-05T07:09:14.162722Z | false |
BogiHsu/Tacotron2-PyTorch | https://github.com/BogiHsu/Tacotron2-PyTorch/blob/b1761fd7660e56adf39f3c8d02852fbaec1da2c5/hparams.py | hparams.py | from text import symbols
class hparams:
seed = 0
################################
# Data Parameters #
################################
text_cleaners=['english_cleaners']
################################
# Audio #
################################
... | python | MIT | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | 2026-01-05T07:09:14.162722Z | false |
BogiHsu/Tacotron2-PyTorch | https://github.com/BogiHsu/Tacotron2-PyTorch/blob/b1761fd7660e56adf39f3c8d02852fbaec1da2c5/model/model.py | model/model.py | import torch
from torch import nn
from math import sqrt
from hparams import hparams as hps
from torch.autograd import Variable
from torch.nn import functional as F
from model.layers import ConvNorm, LinearNorm
from utils.util import mode, get_mask_from_lengths
class Tacotron2Loss(nn.Module):
def __init__(self):
... | python | MIT | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | 2026-01-05T07:09:14.162722Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.