From 3a5c2b2d11f055a54c03272234ea75ad22a9632d Mon Sep 17 00:00:00 2001 From: Nicolas de Lima Date: Thu, 19 Sep 2024 12:28:51 -0300 Subject: [PATCH] Added copyright notice to train.py and eval.py --- training_ws/eval.py | 34 ++++++++++++++++++++++++---------- training_ws/train.py | 40 +++++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/training_ws/eval.py b/training_ws/eval.py index 94ab109..3e42e3a 100644 --- a/training_ws/eval.py +++ b/training_ws/eval.py @@ -1,13 +1,3 @@ -""" -Runs a fasterrcnn_resnet50_fpn model over a dataset. - -Permalink to original code: -https://github.com/NVIDIA-Omniverse/synthetic-data-examples/blob/78622588948e055e27aa8b0ef8494a73855bceeb/end-to-end-workflows/object_detection_fruit/training/code/train.py # noqa -Changes: - - Removed the training logic, and added code to run the model on a dataset - - Changed some args parser options -""" - # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause # @@ -39,6 +29,30 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. + +# Permalink to original code: +# https://github.com/NVIDIA-Omniverse/synthetic-data-examples/blob/78622588948e055e27aa8b0ef8494a73855bceeb/end-to-end-workflows/object_detection_fruit/training/code/train.py # noqa +# Changes: +# - Removed the training logic, and added code to run the model on a dataset +# - Changed some args parser options + + +# Copyright 2024 Ekumen, Inc. +# +# 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 agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Runs a fasterrcnn_resnet50_fpn model over a dataset.""" + import numpy as np from optparse import OptionParser import os diff --git a/training_ws/train.py b/training_ws/train.py index f4f8a08..d5544cf 100644 --- a/training_ws/train.py +++ b/training_ws/train.py @@ -1,16 +1,3 @@ -""" -Trains a fasterrcnn_resnet50_fpn model. - -Permalink to original code: -https://github.com/NVIDIA-Omniverse/synthetic-data-examples/blob/78622588948e055e27aa8b0ef8494a73855bceeb/end-to-end-workflows/object_detection_fruit/training/code/train.py # noqa -Changes: - - Modified the amount of labels - - Made static_labels part of the dataset class - - Removed the epochs option from the args parser and moved it to a constant - - Moved some training values to constants - - Added some logging -""" - # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause # @@ -42,6 +29,33 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. + +# Permalink to original code: +# https://github.com/NVIDIA-Omniverse/synthetic-data-examples/blob/78622588948e055e27aa8b0ef8494a73855bceeb/end-to-end-workflows/object_detection_fruit/training/code/train.py # noqa +# Changes: +# - Modified the amount of labels +# - Made static_labels part of the dataset class +# - Removed the epochs option from the args parser and moved it to a constant +# - Moved some training values to constants +# - Added some logging + + +# Copyright 2024 Ekumen, Inc. +# +# 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 agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Trains a fasterrcnn_resnet50_fpn model.""" + import json import numpy as np from optparse import OptionParser