python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
doc(title="Operations", underline_char="=", entries=[ "general/general_ops_index.py", "image_processing/index.py", "audio_processing/index.py", "sequence_processing/index.py", ])
DALI-main
docs/examples/operations_index.py
doc(title="General Purpose", underline_char="=", entries=[ "expressions/index.py", doc_entry( "reductions.ipynb", op_reference('fn.reductions', "Tutorial describing how to use reductions")), doc_entry( "tensor_join.ipynb", [ ...
DALI-main
docs/examples/general/general_ops_index.py
doc(title="Data Loading", underline_char="=", entries=[ doc_entry("external_input.ipynb", op_reference("fn.external_source", "Intro tutorial for external source")), doc_entry( "parallel_external_source.ipynb", op_reference("fn.external_source", "How to u...
DALI-main
docs/examples/general/data_loading/index.py
doc(title="DALI Expressions and Arithmetic Operations", underline_char="=", entries=[ "expr_examples.ipynb", "expr_type_promotions.ipynb", "expr_blend_image.ipynb", "expr_conditional_and_masking.ipynb", ])
DALI-main
docs/examples/general/expressions/index.py
doc(title="Custom Operations", underline_char="=", entries=[ "custom_operator/create_a_custom_operator.ipynb", doc_entry("python_operator.ipynb", [op_reference('fn.python_function', "Running custom Python code with the family of python_function operators"), o...
DALI-main
docs/examples/custom_operations/index.py
# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. 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...
DALI-main
docs/examples/custom_operations/custom_operator/naive_histogram/naive_histogram_test.py
doc(title="Audio Processing", underline_char="=", entries=[ doc_entry( "audio_decoder.ipynb", op_reference("fn.decoders.audio", "Audio decoder tutorial")), doc_entry( "spectrogram.ipynb", [ op_reference("fn.spectrogram", "Audio spec...
DALI-main
docs/examples/audio_processing/index.py
doc(title="Use Cases", underline_char="=", entries=[ "video_superres/README.rst", "pytorch/resnet50/pytorch-resnet50.rst", "pytorch/single_stage_detector/pytorch_ssd.rst", "pytorch/efficientnet/readme.rst", "tensorflow/resnet-n/README.rst", "tensorflow/yolov4/read...
DALI-main
docs/examples/use_cases/index.py
DALI-main
docs/examples/use_cases/mxnet/resnetn/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/train_imagenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/common/fit.py
DALI-main
docs/examples/use_cases/mxnet/resnetn/common/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/common/find_mxnet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/common/data.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/googlenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/vgg.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/inception-v4.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/resnet-v1.py
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/mlp.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/resnext.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/inception-resnet-v2.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/lenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/mobilenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/inception-bn.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/resnet.py
"""References: Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for large-scale image recognition." arXiv preprint arXiv:1409.1556 (2014). This implements Variant D from the paper. """ import mxnet as mx def get_symbol(num_classes, **kwargs): ## define alexnet data = mx.symbol.Variabl...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/vgg16.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/inception-v3.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DALI-main
docs/examples/use_cases/mxnet/resnetn/symbols/alexnet.py
doc(title="PaddlePaddle Use-Cases", underline_char="=", entries=[ "resnet50/paddle-resnet50.rst", "ssd/paddle-ssd.rst", "tsm/paddle-tsm.rst", ])
DALI-main
docs/examples/use_cases/paddle/index.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/resnet50/resnet.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/resnet50/main.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/ssd/ssd.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/ssd/utils.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2021, NVIDIA CORPORATION & AFFILIATES. 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 a...
DALI-main
docs/examples/use_cases/paddle/ssd/train.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/tsm/tsm.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/tsm/utils.py
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2017-2019, 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 # # htt...
DALI-main
docs/examples/use_cases/paddle/tsm/infer.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/trivial.py
import tensorflow as tf from tensorflow.keras import backend from tensorflow.keras import initializers from tensorflow.keras import models from tensorflow.keras import regularizers from nvutils import image_processing layers = tf.keras.layers L2_WEIGHT_DECAY = 1e-4 BATCH_NORM_DECAY = 0.9 BATCH_NORM_EPSILON = 1e-5 ...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/resnet_model.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/resnet.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/resnet_ctl.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/runner.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/cmdline.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/__init__.py
import tensorflow as tf BASE_LEARNING_RATE = 0.1 LR_SCHEDULE = [ # (multiplier, epoch to start) tuples (1.0, 5), (0.1, 30), (0.01, 60), (0.001, 80) ] def create_piecewise_constant_decay_with_warmup(batch_size, epoch_size, warmup_epochs, boundaries, multipliers, compute_lr_on_cpu=True, name=None): if len...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/common.py
# This is a patch for Horovod 0.21.3 to work with our custom learning schedule # used in CNN resnet50 scripts. from tensorflow import keras from horovod.tensorflow import Compression from tensorflow.python.keras.optimizer_v2 import optimizer_v2 import horovod.tensorflow as hvd import tensorflow as tf from nvutils imp...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/hvd_patch.py
# Copyright 2018 The TensorFlow Authors. 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 applica...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/image_processing.py
#!/usr/bin/env python # Copyright 2018 The TensorFlow Authors. 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 # # Unle...
DALI-main
docs/examples/use_cases/tensorflow/resnet-n/nvutils/runner_ctl.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/utils.py
import multiprocessing from absl import logging import numpy as np import tensorflow as tf import random import re import os import hparams_config import utils from model import efficientdet_net from model.utils import optimizers def run_training(args): logging.set_verbosity(logging.WARNING) args = utils.di...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/train.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/hparams_config.py
import multiprocessing from absl import logging import numpy as np import tensorflow as tf import re import os import hparams_config import utils from model import efficientdet_net def run_eval(args): logging.set_verbosity(logging.WARNING) args = utils.dict_to_namedtuple(args) config = hparams_config.g...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/eval.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/target_assigner.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/matcher.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/faster_rcnn_box_coder.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/shape_utils.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/box_coder.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/box_list.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/region_similarity_calculator.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/argmax_matcher.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/tf/preprocessor.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/tf/dataloader.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/tf/tf_example_decoder.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/tf/gridmask.py
# Copyright 2021 Kacper Kluk, Paweł Anikiel, Jagoda Kamińska. 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 # # Unles...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/dali/efficientdet_pipeline.py
# Copyright 2021 Kacper Kluk, Paweł Anikiel, Jagoda Kamińska. 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 # # Unles...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/pipeline/dali/ops_util.py
# Copyright 2021 Jagoda Kamińska. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/dataset/create_tfrecord_indexes.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/dataset/create_pascal_tfrecord.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/dataset/label_map_util.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/dataset/create_coco_tfrecord.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/dataset/tfrecord_util.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/efficientdet_net.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/utils/fpn_configs.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/utils/postprocess.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/utils/optimizers.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/utils/losses.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/utils/layers.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/backbone/efficientnet_builder.py
# Copyright 2020 Google Research. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/efficientdet/model/backbone/efficientnet_model.py
# Copyright 2021 Paweł Anikiel, Kacper Kluk. 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 app...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/img.py
# Copyright 2021 Kacper Kluk, Jagoda Kamińska. 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 a...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/model.py
# Copyright 2021 Kacper Kluk. 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 applicable law or ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/utils.py
# Copyright 2021 Kacper Kluk. 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 applicable law or ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/train.py
# Copyright 2021 Kacper Kluk. 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 applicable law or ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/inference.py
# Copyright 2021 Kacper Kluk. 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 applicable law or ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/main.py
# Copyright 2021 Jagoda Kamińska. 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 applicable law...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/layers.py
__author__ = 'tylin' __version__ = '2.0' # Interface for accessing the Microsoft COCO dataset. # Microsoft COCO is a large image dataset designed for object detection, # segmentation, and caption generation. pycocotools is a Python API that # assists in loading, parsing and visualizing the annotations in COCO. # Pleas...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/np/coco.py
# Copyright 2021 Kacper Kluk. 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 applicable law or ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/np/pipeline.py
# Copyright 2021 Kacper Kluk, Piotr Kowalewski. 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 ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/dali/ops.py
# Copyright 2021 Kacper Kluk, Piotr Kowalewski. 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 ...
DALI-main
docs/examples/use_cases/tensorflow/yolov4/src/dali/pipeline.py
DALI-main
docs/examples/use_cases/video_superres/__init__.py
import argparse import logging as log import os import time import datetime from functools import reduce import numpy as np from math import ceil, floor from tensorboardX import SummaryWriter import torch import torch.distributed as dist import torch.optim as optim import torch.utils.data.distributed from torch.mult...
DALI-main
docs/examples/use_cases/video_superres/main.py
import argparse import os import subprocess def split_scenes(raw_data_path, out_data_path): out_data_path = os.path.join(out_data_path,'orig','scenes') if not os.path.isdir(os.path.join(out_data_path,'train')): os.makedirs(os.path.join(out_data_path,'train')) if not os.path.isdir(os.path.join(ou...
DALI-main
docs/examples/use_cases/video_superres/tools/split_scenes.py
import argparse import os import subprocess default_format = "png" default_qscale_jpg = "4" def extract_frames(main_data, resolution, format, q, quiet, transcoded, codec, crf, keyint): if transcoded: desc = [resolution, 'scenes'] desc += [codec] if codec else [] desc +=...
DALI-main
docs/examples/use_cases/video_superres/tools/extract_frames.py
import argparse import os import subprocess default_codec = "h264" default_crf = "18" default_keyint = "4" def downsample_scenes(main_data, resolution, codec, crf, keyint, quiet): desc = [resolution, 'scenes'] if not codec: codec = default_codec else: desc += [codec] assert codec in [...
DALI-main
docs/examples/use_cases/video_superres/tools/transcode_scenes.py
import torch from torch import nn from torch.autograd import Variable from torch.nn.parameter import Parameter from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors from common.loss_scaler import DynamicLossScaler, LossScaler FLOAT_TYPES = (torch.FloatTensor, torch.cuda.FloatTensor) HALF_TYPES = (...
DALI-main
docs/examples/use_cases/video_superres/common/fp16.py
DALI-main
docs/examples/use_cases/video_superres/common/__init__.py
import torch import torch.nn as nn from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors class tofp16(nn.Module): """ Model wrapper that implements:: def forward(self, input): return input.half() """ def __init__(self): super(tofp16, self).__init__() ...
DALI-main
docs/examples/use_cases/video_superres/common/fp16util.py