python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/app_handler.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/docker_images.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/infer_data_sources.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/actions.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/automl_handler.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/chaining.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/stateless_handlers.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/utilities.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
api/handlers/infer_params.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/lprnet/preprocess_openalpr_benchmark.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/fpenet/data_utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/heartratenet/process_cohface.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/metric_learning_recognition/process_retail_product_checkout_dataset.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/kitti/kitti_to_coco.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/calibration_kitti.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/drop_class.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/gen_lidar_labels.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/kitti_split.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/object3d_kitti.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pointpillars/gen_lidar_points.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/unet/prepare_data_isbi.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/re_identification/obtain_subset_data.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/pose_classification/select_subset_actions.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/cli/dataset_prepare/ocrnet/preprocess_label.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/lprnet/preprocess_openalpr_benchmark.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/fpenet/data_utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/metric_learning_recognition/process_retail_product_checkout_dataset.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/kitti/kitti_to_coco.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/calibration_kitti.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/drop_class.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/gen_lidar_labels.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/kitti_split.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/object3d_kitti.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pointpillars/gen_lidar_points.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/unet/prepare_data_isbi.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/re_identification/obtain_subset_data.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/pose_classification/select_subset_actions.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # 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 appli...
tao_front_end_services-main
notebooks/api/dataset_prepare/ocrnet/preprocess_label.py
__author__ = 'Sean Griffin' __version__ = '1.0.0' __email__ = 'sean@thoughtbot.com' import sys import os.path import json import shutil from pymel.core import * from maya.OpenMaya import * from maya.OpenMayaMPx import * kPluginTranslatorTypeName = 'Three.js' kOptionScript = 'ThreeJsExportScript' kDefaultOptionsStri...
three.js-master
utils/exporters/maya/plug-ins/threeJsFileTranslator.py
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
three.js-master
utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/import_threejs.py
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
three.js-master
utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/export_threejs.py
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
three.js-master
utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/__init__.py
#!/usr/bin/env python import sys if sys.version_info < (2, 7): print("This script requires at least Python 2.7.") print("Please, update to a newer version: http://www.python.org/download/releases/") exit() import argparse import json import os import re import shutil import tempfile def main(argv=None): parse...
three.js-master
utils/editors/sublime.py
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader) ------------------------- How to use this converter ------------------------- python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a center|centerxz|top|bo...
three.js-master
utils/converters/obj/convert_obj_three.py
"""Split single OBJ model into mutliple OBJ files by materials ------------------------------------- How to use ------------------------------------- python split_obj.py -i infile.obj -o outfile Will generate: outfile_000.obj outfile_001.obj ... outfile_XXX.obj ------------------------------------- Parser based ...
three.js-master
utils/converters/obj/split_obj.py
#!/usr/bin/env python __doc__ = ''' Convert a json file to msgpack. If fed only an input file the converted will write out a .pack file of the same base name in the same directory $ json2msgpack.py -i foo.json foo.json > foo.pack Specify an output file path $ json2msgpack.py -i foo.json -o /bar/tmp/bar.pack foo.json...
three.js-master
utils/converters/msgpack/json2msgpack.py
version = (0, 4, 2)
three.js-master
utils/converters/msgpack/msgpack/_version.py
# coding: utf-8 from msgpack._version import version from msgpack.exceptions import * from collections import namedtuple class ExtType(namedtuple('ExtType', 'code data')): """ExtType represents ext type in msgpack.""" def __new__(cls, code, data): if not isinstance(code, int): raise TypeE...
three.js-master
utils/converters/msgpack/msgpack/__init__.py
class UnpackException(Exception): pass class BufferFull(UnpackException): pass class OutOfData(UnpackException): pass class UnpackValueError(UnpackException, ValueError): pass class ExtraData(ValueError): def __init__(self, unpacked, extra): self.unpacked = unpacked self.extr...
three.js-master
utils/converters/msgpack/msgpack/exceptions.py
"""Fallback pure Python implementation of msgpack""" import sys import array import struct if sys.version_info[0] == 3: PY3 = True int_types = int Unicode = str xrange = range def dict_iteritems(d): return d.items() else: PY3 = False int_types = (int, long) Unicode = unicode ...
three.js-master
utils/converters/msgpack/msgpack/fallback.py
# @author zfedoran / http://github.com/zfedoran import os import sys import math import operator import re import json import types import shutil # ##################################################### # Globals # ##################################################### option_triangulate = True option_textures = True o...
three.js-master
utils/converters/fbx/convert_to_threejs.py
"""Join multiple binary files into single file and generate JSON snippet with offsets ------------------------------------- How to use ------------------------------------- python join_ctm.py -i "part_*.ctm" -o joined.ctm [-j offsets.js] Will read multiple files following wildcard pattern (ordered lexicographically)...
three.js-master
utils/converters/ctm/join_ctm.py
#!/usr/bin/env python import sys if sys.version_info < (2, 7): print("This script requires at least Python 2.7.") print("Please, update to a newer version: http://www.python.org/download/releases/") # exit() import argparse import json import os import shutil import tempfile def main(argv=None): parser = argpa...
three.js-master
utils/build/build.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
plotting_utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
inference_voice_conversion.py
# original source takes from https://github.com/jik876/hifi-gan/ # MIT License # # Copyright (c) 2020 Jungil Kong # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includ...
radtts-main
hifigan_env.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
radtts.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
alignment.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
audio_processing.py
# Original Source: # Original Source: # https://github.com/ndeutschmann/zunis/blob/master/zunis_lib/zunis/models/flows/coupling_cells/piecewise_coupling/piecewise_linear.py # https://github.com/ndeutschmann/zunis/blob/master/zunis_lib/zunis/models/flows/coupling_cells/piecewise_coupling/piecewise_quadratic.py # Modific...
radtts-main
splines.py
# original source takes from https://github.com/jik876/hifi-gan/ # MIT License # # Copyright (c) 2020 Jungil Kong # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includ...
radtts-main
hifigan_utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
loss.py
# Original source: https://github.com/NVIDIA/waveglow/blob/master/distributed.py # # Original license text: # ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or wit...
radtts-main
distributed.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
common.py
# Original source taken from https://github.com/LiyuanLucasLiu/RAdam # # Copyright 2019 Liyuan Liu # # 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/licens...
radtts-main
radam.py
# adapted from https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/SpeechSynthesis/FastPitch/fastpitch/transformer.py # Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
radtts-main
transformer.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
autoregressive_flow.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
train.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
inference.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
hifigan_denoiser.py
# Modified partialconv source code based on implementation from # https://github.com/NVIDIA/partialconv/blob/master/models/partialconv2d.py ############################################################################### # BSD 3-Clause License # # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Author &...
radtts-main
partialconv1d.py
# original source takes from https://github.com/jik876/hifi-gan/ # MIT License # # Copyright (c) 2020 Jungil Kong # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includ...
radtts-main
hifigan_models.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
attribute_prediction_model.py
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
radtts-main
data.py
""" adapted from https://github.com/keithito/tacotron """ import re _letters_and_numbers_re = re.compile( r"((?:[a-zA-Z]+[0-9]|[0-9]+[a-zA-Z])[a-zA-Z0-9']*)", re.IGNORECASE) _hardware_re = re.compile( '([0-9]+(?:[.,][0-9]+)?)(?:\s?)(tb|gb|mb|kb|ghz|mhz|khz|hz|mm)', re.IGNORECASE) _hardware_key = {'tb': 'terab...
radtts-main
tts_text_processing/letters_and_numbers.py
""" adapted from https://github.com/keithito/tacotron """ import re valid_symbols = [ 'AA', 'AA0', 'AA1', 'AA2', 'AE', 'AE0', 'AE1', 'AE2', 'AH', 'AH0', 'AH1', 'AH2', 'AO', 'AO0', 'AO1', 'AO2', 'AW', 'AW0', 'AW1', 'AW2', 'AY', 'AY0', 'AY1', 'AY2', 'B', 'CH', 'D', 'DH', 'EH', 'EH0', 'EH1', 'EH2', 'ER', 'ER0', '...
radtts-main
tts_text_processing/cmudict.py
import re _no_period_re = re.compile(r'(No[.])(?=[ ]?[0-9])') _percent_re = re.compile(r'([ ]?[%])') _half_re = re.compile('([0-9]½)|(½)') # List of (regular expression, replacement) pairs for abbreviations: _abbreviations = [(re.compile('\\b%s\\.' % x[0], re.IGNORECASE), x[1]) for x in [ ('mrs', 'misess'), ...
radtts-main
tts_text_processing/abbreviations.py
""" adapted from https://github.com/keithito/tacotron """ import re import numpy as np from . import cleaners from .cleaners import Cleaner from .symbols import get_symbols from .grapheme_dictionary import Grapheme2PhonemeDictionary ######### # REGEX # ######### # Regular expression matching text enclosed in curly ...
radtts-main
tts_text_processing/text_processing.py
""" adapted from https://github.com/keithito/tacotron """ import inflect import re _magnitudes = ['trillion', 'billion', 'million', 'thousand', 'hundred', 'm', 'b', 't'] _magnitudes_key = {'m': 'million', 'b': 'billion', 't': 'trillion'} _measurements = '(f|c|k|d|m)' _measurements_key = {'f': 'fahrenheit', ...
radtts-main
tts_text_processing/numerical.py
""" adapted from https://github.com/keithito/tacotron """ import re _alt_re = re.compile(r'\([0-9]+\)') class Grapheme2PhonemeDictionary: """Thin wrapper around g2p data.""" def __init__(self, file_or_path, keep_ambiguous=True, encoding='latin-1'): with open(file_or_path, encoding=encoding) as f: ...
radtts-main
tts_text_processing/grapheme_dictionary.py
""" adapted from https://github.com/keithito/tacotron """ ''' Defines the set of symbols used in text input to the model. The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters.''' arpabet = [ 'AA', 'AA0', 'AA1...
radtts-main
tts_text_processing/symbols.py
""" adapted from https://github.com/keithito/tacotron """ ''' Cleaners are transformations that run over the input text at both training and eval time. Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners" hyperparameter. Some cleaners are English-specific. You'll typically wan...
radtts-main
tts_text_processing/cleaners.py
""" adapted from https://github.com/keithito/tacotron """ import re _ampm_re = re.compile( r'([0-9]|0[0-9]|1[0-9]|2[0-3]):?([0-5][0-9])?\s*([AaPp][Mm]\b)') def _expand_ampm(m): matches = list(m.groups(0)) txt = matches[0] txt = txt if int(matches[1]) == 0 else txt + ' ' + matches[1] if matches[2...
radtts-main
tts_text_processing/datestime.py
import re from .cmudict import CMUDict _letter_to_arpabet = { 'A': 'EY1', 'B': 'B IY1', 'C': 'S IY1', 'D': 'D IY1', 'E': 'IY1', 'F': 'EH1 F', 'G': 'JH IY1', 'H': 'EY1 CH', 'I': 'AY1', 'J': 'JH EY1', 'K': 'K EY1', 'L': 'EH1 L', 'M': 'EH1 M', 'N': 'EH1 N', 'O':...
radtts-main
tts_text_processing/acronyms.py
""" Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. This script is for dumping the gaussian landmark predictions, provided the dataset and trained landmark model checkpoint. This is necessary for evaluating the landmark quality (on BBC) as well as for performing the video manipulation tasks. """ import to...
UnsupervisedLandmarkLearning-master
dump_preds.py
"""Main training script. Currently only supports the BBCPose dataset """ from apex.parallel import DistributedDataParallel as DDP from utils.visualizer import dump_image, project_heatmaps_colorized from models.losses import Vgg19PerceptualLoss, GANLoss from torch.utils.data import DataLoader from tensorboardX import Su...
UnsupervisedLandmarkLearning-master
train.py
"""Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. Dataset classes for handling the BBCPose data """ from torch.utils.data import Dataset import torch import os from PIL import Image import numpy as np import torchvision.transforms as transforms import scipy.io as sio from .base_datasets import BaseVideo...
UnsupervisedLandmarkLearning-master
dataloaders/bbc_pose_dataset.py
""" Custom transformation functions for image augmentation """ import random import numpy as np from numpy.random import random_sample import cv2 # for TPS import torch import torchvision.transforms as transforms_t import torchvision.transforms.functional as F class TPSWarp(object): """ TPS param for non-li...
UnsupervisedLandmarkLearning-master
dataloaders/transforms.py
""" Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. Base class for our video dataset """ from torch.utils.data import Dataset import numpy as np import torchvision.transforms as transforms from .transforms import TPSWarp, PairedColorJitter class BaseVideoDataset(Dataset): """ Base dataset class...
UnsupervisedLandmarkLearning-master
dataloaders/base_datasets.py
UnsupervisedLandmarkLearning-master
dataloaders/__init__.py
import torch import torch.distributed import yaml import os from models.part_factorized_model import PartFactorizedModel def denormalize_batch(batch, div_factor=1): """denormalize for visualization""" # normalize using imagenet mean and std mean = batch.data.new(batch.data.size()) std = batch.data.ne...
UnsupervisedLandmarkLearning-master
utils/utils.py
""" Utility functions for visualization and image dumping """ from utils.utils import denormalize_batch from PIL import Image from PIL import ImageDraw import numpy as np def uint82bin(n, count=8): """adapted from https://github.com/ycszen/pytorch-segmentation/blob/master/transform.py returns the binary of i...
UnsupervisedLandmarkLearning-master
utils/visualizer.py
""" Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. This file contains subroutines for our training pipeline """ import torch import torch.nn as nn def conv_ReLU(in_channels, out_channels, kernel_size, stride=1, padding=0, use_norm=True, norm=nn.InstanceNorm2d): """Returns a 2D Conv f...
UnsupervisedLandmarkLearning-master
models/submodules.py
"""Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. Parameterized Unet module that we use to construct our shape and appearance encoders """ import torch.nn as nn from .submodules import conv_ReLU, encoder_block, decoder_block class Unet(nn.Module): def __init__(self, num_input_channels, decoder_ou...
UnsupervisedLandmarkLearning-master
models/unet.py
UnsupervisedLandmarkLearning-master
models/__init__.py
""" Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. Network definition for our shape and appearance encoder model. Heavily inspired by the network architecture described in https://arxiv.org/pdf/1903.06946.pdf """ import torch import torch.nn as nn import torch.nn.functional from collections import named...
UnsupervisedLandmarkLearning-master
models/part_factorized_model.py
""" Copyright (C) 2019,2020 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). Modifications made to adapt the SPADE code to this work. """ import torch.nn as nn from torch.nn import init import torch.nn.functional as F i...
UnsupervisedLandmarkLearning-master
models/generator.py
"""Implementation for various loss modules GAN loss adapted from pix2pixHD (see comment below) """ import torch import torch.nn as nn from torch.autograd import Variable import torchvision.models as models class PerceptualLoss(nn.Module): def __init__(self): super(PerceptualLoss, self).__init__() ...
UnsupervisedLandmarkLearning-master
models/losses.py
""" Original source: https://github.com/NVlabs/SPADE/blob/master/models/networks/normalization.py Modifications made to adapt to this work Copyright (C) 2019,2020 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). """ impo...
UnsupervisedLandmarkLearning-master
models/normalization.py