From 8ddb40d833c9da0dfab1e78075db0ef0235109c9 Mon Sep 17 00:00:00 2001 From: "hongliang.yuan" Date: Thu, 26 Dec 2024 13:54:20 +0800 Subject: [PATCH] add license header --- 3d-reconstruction/ngp-nerf/pytorch/gridencoder/grid.py | 4 +++- .../ngp-nerf/pytorch/gridencoder/src/gridencoder.cu | 2 ++ .../ngp-nerf/pytorch/gridencoder/src/gridencoder.h | 4 +++- 3d-reconstruction/ngp-nerf/pytorch/main_nerf.py | 2 ++ 3d-reconstruction/ngp-nerf/pytorch/nerf/network.py | 2 ++ 3d-reconstruction/ngp-nerf/pytorch/nerf/provider.py | 2 ++ 3d-reconstruction/ngp-nerf/pytorch/nerf/renderer.py | 4 +++- 3d-reconstruction/ngp-nerf/pytorch/nerf/utils.py | 2 ++ .../ngp-nerf/pytorch/raymarching/src/raymarching.cu | 4 +++- .../ngp-nerf/pytorch/shencoder/sphere_harmonics.py | 4 +++- .../ngp-nerf/pytorch/shencoder/src/shencoder.cu | 4 +++- .../ngp-nerf/pytorch/shencoder/src/shencoder.h | 4 +++- .../centerpoint/pytorch/tools/nusc_tracking/pub_tracker.py | 2 ++ cv/Pruning/Network-Slimming/pytorch/denseprune.py | 4 +++- cv/Pruning/Network-Slimming/pytorch/main.py | 2 ++ cv/Pruning/Network-Slimming/pytorch/models/densenet.py | 4 +++- cv/Pruning/Network-Slimming/pytorch/models/preresnet.py | 4 +++- cv/Pruning/Network-Slimming/pytorch/resprune.py | 4 +++- cv/Pruning/Network-Slimming/pytorch/vggprune.py | 4 +++- cv/classification/acmix/pytorch/Swin-Transformer/main.py | 2 ++ cv/classification/internimage/pytorch/config.py | 2 ++ cv/classification/internimage/pytorch/dataset/__init__.py | 4 +++- cv/classification/internimage/pytorch/models/build.py | 2 ++ .../internimage/pytorch/models/intern_image.py | 2 ++ .../internimage/pytorch/ops_dcnv3/functions/dcnv3_func.py | 2 ++ cv/classification/internimage/pytorch/ops_dcnv3/make.sh | 4 +++- .../internimage/pytorch/ops_dcnv3/modules/dcnv3.py | 2 ++ cv/classification/internimage/pytorch/ops_dcnv3/setup.py | 2 ++ .../internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.cu | 4 +++- .../internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.h | 2 ++ .../pytorch/ops_dcnv3/src/cuda/dcnv3_im2col_cuda.cuh | 4 +++- cv/classification/internimage/pytorch/ops_dcnv3/src/dcnv3.h | 2 ++ cv/classification/internimage/pytorch/ops_dcnv3/test.py | 2 ++ cv/classification/internimage/pytorch/optimizer.py | 2 ++ cv/classification/internimage/pytorch/utils.py | 2 ++ cv/classification/repvit/pytorch/main.py | 2 ++ cv/classification/repvit/pytorch/model/repvit.py | 4 +++- cv/classification/swin_transformer/pytorch/config.py | 2 ++ cv/classification/swin_transformer/pytorch/data/__init__.py | 4 +++- cv/classification/swin_transformer/pytorch/lr_scheduler.py | 2 ++ cv/classification/swin_transformer/pytorch/main.py | 2 ++ cv/classification/swin_transformer/pytorch/main_moe.py | 2 ++ cv/classification/swin_transformer/pytorch/models/build.py | 2 ++ cv/classification/swin_transformer/pytorch/optimizer.py | 2 ++ cv/classification/swin_transformer/pytorch/utils.py | 2 ++ cv/classification/wavemlp/pytorch/train.py | 2 ++ cv/detection/fcos/pytorch/fcos/fcos.py | 2 ++ cv/detection/fcos/pytorch/fcos_core/config/paths_catalog.py | 2 ++ .../fcos/pytorch/fcos_core/csrc/cuda/deform_conv_cuda.cu | 2 ++ .../fcos/pytorch/fcos_core/csrc/cuda/deform_pool_cuda.cu | 2 ++ .../fcos/pytorch/fcos_core/modeling/rpn/fcos/inference.py | 2 ++ .../fcos/pytorch/fcos_core/utils/c2_model_loading.py | 2 ++ cv/detection/fcos/pytorch/fcos_core/utils/imports.py | 2 ++ cv/detection/rt-detr/pytorch/src/misc/dist.py | 2 ++ cv/detection/rt-detr/pytorch/src/nn/backbone/__init__.py | 4 +++- cv/detection/rt-detr/pytorch/src/zoo/rtdetr/rtdetr.py | 2 ++ cv/detection/rt-detr/pytorch/tools/export_onnx.py | 2 ++ cv/detection/rt-detr/pytorch/tools/train.py | 2 ++ .../mmrazor/mmrazor/implementations/pruning/__init__.py | 2 ++ .../backend_config/common_operator_config_utils.py | 2 ++ .../structures/quantization/backend_config/mapping.py | 2 ++ cv/distiller/CWD/pytorch/mmrazor/mmrazor/utils/log_tools.py | 2 ++ cv/face/arcface/pytorch/utils/utils.py | 4 +++- cv/face/facenet/pytorch/utils/dataloader.py | 2 ++ cv/face/facenet/pytorch/utils/utils.py | 4 +++- cv/instance_segmentation/yolact/pytorch/data/config.py | 2 ++ .../yolact/pytorch/external/DCNv2/dcn_v2.py | 2 ++ .../yolact/pytorch/external/DCNv2/setup.py | 2 ++ .../yolact/pytorch/external/DCNv2/src/cpu/dcn_v2_cpu.cpp | 2 ++ .../yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_cuda.cu | 2 ++ .../pytorch/external/DCNv2/src/cuda/dcn_v2_im2col_cuda.cu | 4 +++- .../external/DCNv2/src/cuda/dcn_v2_psroi_pooling_cuda.cu | 2 ++ .../yolact/pytorch/external/DCNv2/src/cuda/vision.h | 4 +++- .../yolact/pytorch/external/DCNv2/src/dcn_v2.h | 4 +++- cv/instance_segmentation/yolact/pytorch/train.py | 2 ++ .../Point-BERT/pytorch/extensions/emd/cuda/emd_kernel.cu | 2 ++ cv/point_cloud/Point-BERT/pytorch/install.sh | 3 +++ cv/point_cloud/Point-BERT/pytorch/main_BERT.py | 2 ++ cv/point_cloud/Point-BERT/pytorch/models/dvae.py | 2 ++ .../Point-BERT/pytorch/scripts/dist_train_BERT.sh | 4 +++- cv/point_cloud/Point-BERT/pytorch/scripts/train.sh | 4 +++- .../Point-BERT/pytorch/tools/runner_BERT_finetune.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/datasets/__init__.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/models/__init__.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/models/layers/Resnet.py | 2 ++ .../pytorch/alphapose/models/layers/ShuffleResnet.py | 2 ++ .../alphapose/models/layers/dcn/src/deform_conv_cuda.cpp | 4 +++- .../models/layers/dcn/src/deform_conv_cuda_kernel.cu | 2 ++ .../alphapose/models/layers/dcn/src/deform_pool_cuda.cpp | 2 ++ .../models/layers/dcn/src/deform_pool_cuda_kernel.cu | 4 +++- cv/pose/alphapose/pytorch/alphapose/utils/bbox.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/detector.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/file_detector.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/metrics.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/pPose_nms.py | 2 ++ .../alphapose/pytorch/alphapose/utils/presets/__init__.py | 2 ++ .../pytorch/alphapose/utils/presets/simple_transform.py | 2 ++ .../alphapose/pytorch/alphapose/utils/roi_align/__init__.py | 2 ++ .../pytorch/alphapose/utils/roi_align/roi_align.py | 2 ++ .../alphapose/utils/roi_align/src/roi_align_cuda.cpp | 4 +++- .../alphapose/utils/roi_align/src/roi_align_kernel.cu | 4 +++- cv/pose/alphapose/pytorch/alphapose/utils/transforms.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/vis.py | 2 ++ .../alphapose/pytorch/alphapose/utils/webcam_detector.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/utils/writer.py | 2 ++ cv/pose/alphapose/pytorch/alphapose/version.py | 2 ++ cv/pose/alphapose/pytorch/detector/nms/__init__.py | 2 ++ cv/pose/alphapose/pytorch/detector/yolo/preprocess.py | 2 ++ cv/pose/alphapose/pytorch/detector/yolo/util.py | 2 ++ cv/semantic_segmentation/bisenetv2/pytorch/lib/logger.py | 2 ++ .../bisenetv2/pytorch/lib/models/bisenetv1.py | 2 ++ .../bisenetv2/pytorch/lib/models/bisenetv2.py | 2 ++ .../bisenetv2/pytorch/tools/export_onnx.py | 2 ++ .../bisenetv2/pytorch/tools/train_amp.py | 2 ++ .../ocrnet/pytorch/lib/config/default.py | 2 ++ .../ocrnet/pytorch/lib/config/models.py | 2 ++ .../ocrnet/pytorch/lib/core/criterion.py | 4 +++- .../ocrnet/pytorch/lib/datasets/__init__.py | 4 +++- .../ocrnet/pytorch/lib/datasets/base_dataset.py | 2 ++ .../ocrnet/pytorch/lib/datasets/cityscapes.py | 2 ++ cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/lip.py | 2 ++ .../ocrnet/pytorch/lib/datasets/pascal_ctx.py | 2 ++ .../ocrnet/pytorch/lib/models/__init__.py | 4 +++- .../ocrnet/pytorch/lib/models/seg_hrnet.py | 2 ++ cv/semantic_segmentation/ocrnet/pytorch/lib/utils/utils.py | 4 +++- cv/semantic_segmentation/ocrnet/pytorch/tools/test.py | 2 ++ cv/super_resolution/ttvsr/pytorch/mmedit/models/__init__.py | 2 ++ .../Language-Image_Pre-Training/clip/pytorch/clip/clip.py | 2 ++ .../Language-Image_Pre-Training/clip/pytorch/clip/model.py | 2 ++ multimodal/diffusion/ControlNet/cldm/logger.py | 2 ++ multimodal/diffusion/ControlNet/config.py | 2 ++ .../diffusion/ControlNet/ldm/models/diffusion/ddpm.py | 2 ++ multimodal/diffusion/ddpm/main.py | 2 ++ multimodal/diffusion/ddpm/score/inception.py | 2 ++ nlp/llm/baichuan2-7b/Baichuan2/fine-tune/fine-tune.py | 2 ++ .../rnnt/pytorch/common/data/dali/iterator.py | 2 ++ speech/speech_recognition/rnnt/pytorch/inference.py | 2 ++ .../rnnt/pytorch/scripts/create_sentencepieces.sh | 3 +++ .../rnnt/pytorch/scripts/docker/launch.sh | 4 +++- .../rnnt/pytorch/scripts/download_librispeech.sh | 6 ++++-- speech/speech_recognition/rnnt/pytorch/scripts/inference.sh | 2 ++ .../rnnt/pytorch/scripts/preprocess_librispeech.sh | 4 +++- speech/speech_recognition/rnnt/pytorch/train.py | 2 ++ .../rnnt/pytorch/utils/download_librispeech.py | 2 ++ speech/speech_synthesis/vqmivc/pytorch/preprocess.py | 2 ++ speech/speech_synthesis/waveglow/pytorch/glow.py | 2 ++ speech/speech_synthesis/waveglow/pytorch/train.py | 2 ++ 147 files changed, 334 insertions(+), 38 deletions(-) diff --git a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/grid.py b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/grid.py index 7d7fc86e..93770cb4 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/grid.py +++ b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/grid.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import numpy as np import torch @@ -153,4 +155,4 @@ class GridEncoder(nn.Module): #print('outputs', outputs.shape, outputs.dtype, outputs.min().item(), outputs.max().item()) - return outputs \ No newline at end of file + return outputs diff --git a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.cu b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.cu index c013e503..744e82fb 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.cu +++ b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include #include diff --git a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.h b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.h index b093e782..c0ed8d78 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.h +++ b/3d-reconstruction/ngp-nerf/pytorch/gridencoder/src/gridencoder.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #ifndef _HASH_ENCODE_H #define _HASH_ENCODE_H @@ -12,4 +14,4 @@ void grid_encode_forward(const at::Tensor inputs, const at::Tensor embeddings, const at::Tensor offsets, at::Tensor outputs, const uint32_t B, const uint32_t D, const uint32_t C, const uint32_t L, const float S, const uint32_t H, const bool calc_grad_inputs, at::Tensor dy_dx, const uint32_t gridtype, const bool align_corners); void grid_encode_backward(const at::Tensor grad, const at::Tensor inputs, const at::Tensor embeddings, const at::Tensor offsets, at::Tensor grad_embeddings, const uint32_t B, const uint32_t D, const uint32_t C, const uint32_t L, const float S, const uint32_t H, const bool calc_grad_inputs, const at::Tensor dy_dx, at::Tensor grad_inputs, const uint32_t gridtype, const bool align_corners); -#endif \ No newline at end of file +#endif diff --git a/3d-reconstruction/ngp-nerf/pytorch/main_nerf.py b/3d-reconstruction/ngp-nerf/pytorch/main_nerf.py index b1cb3cf9..64091204 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/main_nerf.py +++ b/3d-reconstruction/ngp-nerf/pytorch/main_nerf.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch import argparse diff --git a/3d-reconstruction/ngp-nerf/pytorch/nerf/network.py b/3d-reconstruction/ngp-nerf/pytorch/nerf/network.py index b77b5352..80382168 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/nerf/network.py +++ b/3d-reconstruction/ngp-nerf/pytorch/nerf/network.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch import torch.nn as nn import torch.nn.functional as F diff --git a/3d-reconstruction/ngp-nerf/pytorch/nerf/provider.py b/3d-reconstruction/ngp-nerf/pytorch/nerf/provider.py index ded5a201..aba383c6 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/nerf/provider.py +++ b/3d-reconstruction/ngp-nerf/pytorch/nerf/provider.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import cv2 import glob diff --git a/3d-reconstruction/ngp-nerf/pytorch/nerf/renderer.py b/3d-reconstruction/ngp-nerf/pytorch/nerf/renderer.py index fa11b20f..c55b3818 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/nerf/renderer.py +++ b/3d-reconstruction/ngp-nerf/pytorch/nerf/renderer.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import math import trimesh import numpy as np @@ -571,4 +573,4 @@ class NeRFRenderer(nn.Module): else: results = _run(rays_o, rays_d, **kwargs) - return results \ No newline at end of file + return results diff --git a/3d-reconstruction/ngp-nerf/pytorch/nerf/utils.py b/3d-reconstruction/ngp-nerf/pytorch/nerf/utils.py index 3fcdf151..41d86e9d 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/nerf/utils.py +++ b/3d-reconstruction/ngp-nerf/pytorch/nerf/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import glob import tqdm diff --git a/3d-reconstruction/ngp-nerf/pytorch/raymarching/src/raymarching.cu b/3d-reconstruction/ngp-nerf/pytorch/raymarching/src/raymarching.cu index 9195b32f..30d3fbbe 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/raymarching/src/raymarching.cu +++ b/3d-reconstruction/ngp-nerf/pytorch/raymarching/src/raymarching.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include #include @@ -912,4 +914,4 @@ void composite_rays(const uint32_t n_alive, const uint32_t n_step, const float T image.scalar_type(), "composite_rays", ([&] { kernel_composite_rays<<>>(n_alive, n_step, T_thresh, rays_alive.data_ptr(), rays_t.data_ptr(), sigmas.data_ptr(), rgbs.data_ptr(), deltas.data_ptr(), weights.data_ptr(), depth.data_ptr(), image.data_ptr()); })); -} \ No newline at end of file +} diff --git a/3d-reconstruction/ngp-nerf/pytorch/shencoder/sphere_harmonics.py b/3d-reconstruction/ngp-nerf/pytorch/shencoder/sphere_harmonics.py index c2dc84e5..0158e1af 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/shencoder/sphere_harmonics.py +++ b/3d-reconstruction/ngp-nerf/pytorch/shencoder/sphere_harmonics.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import numpy as np import torch @@ -84,4 +86,4 @@ class SHEncoder(nn.Module): outputs = sh_encode(inputs, self.degree, inputs.requires_grad) outputs = outputs.reshape(prefix_shape + [self.output_dim]) - return outputs \ No newline at end of file + return outputs diff --git a/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.cu b/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.cu index c3ee5d23..cda164bd 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.cu +++ b/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include @@ -438,4 +440,4 @@ void sh_encode_backward(at::Tensor grad, at::Tensor inputs, const uint32_t B, co grad.scalar_type(), "sh_encode_backward_cuda", ([&] { sh_encode_backward_cuda(grad.data_ptr(), inputs.data_ptr(), B, D, C, dy_dx.data_ptr(), grad_inputs.data_ptr()); })); -} \ No newline at end of file +} diff --git a/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.h b/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.h index 69d2e57f..c5bd6209 100644 --- a/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.h +++ b/3d-reconstruction/ngp-nerf/pytorch/shencoder/src/shencoder.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ # pragma once #include @@ -10,4 +12,4 @@ void sh_encode_forward(at::Tensor inputs, at::Tensor outputs, const uint32_t B, const uint32_t D, const uint32_t C, const bool calc_grad_inputs, at::Tensor dy_dx); // sh_encode_backward(grad, inputs, B, input_dim, degree, ctx.calc_grad_inputs, dy_dx, grad_inputs) -void sh_encode_backward(at::Tensor grad, at::Tensor inputs, const uint32_t B, const uint32_t D, const uint32_t C, at::Tensor dy_dx, at::Tensor grad_inputs); \ No newline at end of file +void sh_encode_backward(at::Tensor grad, at::Tensor inputs, const uint32_t B, const uint32_t D, const uint32_t C, at::Tensor dy_dx, at::Tensor grad_inputs); diff --git a/cv/3d_detection/centerpoint/pytorch/tools/nusc_tracking/pub_tracker.py b/cv/3d_detection/centerpoint/pytorch/tools/nusc_tracking/pub_tracker.py index 3dad4888..5dec193d 100644 --- a/cv/3d_detection/centerpoint/pytorch/tools/nusc_tracking/pub_tracker.py +++ b/cv/3d_detection/centerpoint/pytorch/tools/nusc_tracking/pub_tracker.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import numpy as np import copy from track_utils import greedy_assignment diff --git a/cv/Pruning/Network-Slimming/pytorch/denseprune.py b/cv/Pruning/Network-Slimming/pytorch/denseprune.py index 2ef29026..eb6870f9 100644 --- a/cv/Pruning/Network-Slimming/pytorch/denseprune.py +++ b/cv/Pruning/Network-Slimming/pytorch/denseprune.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import argparse from torchvision import datasets, transforms @@ -199,4 +201,4 @@ torch.save({'cfg': cfg, 'state_dict': newmodel.state_dict()}, os.path.join(args. print(newmodel) model = newmodel -test(model) \ No newline at end of file +test(model) diff --git a/cv/Pruning/Network-Slimming/pytorch/main.py b/cv/Pruning/Network-Slimming/pytorch/main.py index 73198e7d..72753453 100644 --- a/cv/Pruning/Network-Slimming/pytorch/main.py +++ b/cv/Pruning/Network-Slimming/pytorch/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from __future__ import print_function import os import json diff --git a/cv/Pruning/Network-Slimming/pytorch/models/densenet.py b/cv/Pruning/Network-Slimming/pytorch/models/densenet.py index cdb3dd42..47a578e9 100644 --- a/cv/Pruning/Network-Slimming/pytorch/models/densenet.py +++ b/cv/Pruning/Network-Slimming/pytorch/models/densenet.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import math import torch import torch.nn as nn @@ -131,4 +133,4 @@ class densenet(nn.Module): x = x.view(x.size(0), -1) x = self.fc(x) - return x \ No newline at end of file + return x diff --git a/cv/Pruning/Network-Slimming/pytorch/models/preresnet.py b/cv/Pruning/Network-Slimming/pytorch/models/preresnet.py index 184d97c0..cb6309ef 100644 --- a/cv/Pruning/Network-Slimming/pytorch/models/preresnet.py +++ b/cv/Pruning/Network-Slimming/pytorch/models/preresnet.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from __future__ import absolute_import import math import torch.nn as nn @@ -133,4 +135,4 @@ class resnet(nn.Module): x = x.view(x.size(0), -1) x = self.fc(x) - return x \ No newline at end of file + return x diff --git a/cv/Pruning/Network-Slimming/pytorch/resprune.py b/cv/Pruning/Network-Slimming/pytorch/resprune.py index d78a367e..d807e278 100644 --- a/cv/Pruning/Network-Slimming/pytorch/resprune.py +++ b/cv/Pruning/Network-Slimming/pytorch/resprune.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import argparse from torchvision import datasets, transforms @@ -215,4 +217,4 @@ torch.save({'cfg': cfg, 'state_dict': newmodel.state_dict()}, os.path.join(args. print(newmodel) model = newmodel -test(model) \ No newline at end of file +test(model) diff --git a/cv/Pruning/Network-Slimming/pytorch/vggprune.py b/cv/Pruning/Network-Slimming/pytorch/vggprune.py index 8ca615da..a694d839 100644 --- a/cv/Pruning/Network-Slimming/pytorch/vggprune.py +++ b/cv/Pruning/Network-Slimming/pytorch/vggprune.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import argparse from torchvision import datasets, transforms @@ -174,4 +176,4 @@ torch.save({'cfg': cfg, 'state_dict': newmodel.state_dict()}, os.path.join(args. print(newmodel) model = newmodel -test(model) \ No newline at end of file +test(model) diff --git a/cv/classification/acmix/pytorch/Swin-Transformer/main.py b/cv/classification/acmix/pytorch/Swin-Transformer/main.py index 5ce9a306..796be9e7 100644 --- a/cv/classification/acmix/pytorch/Swin-Transformer/main.py +++ b/cv/classification/acmix/pytorch/Swin-Transformer/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/internimage/pytorch/config.py b/cv/classification/internimage/pytorch/config.py index 45f8f9ed..5b413ed8 100644 --- a/cv/classification/internimage/pytorch/config.py +++ b/cv/classification/internimage/pytorch/config.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/dataset/__init__.py b/cv/classification/internimage/pytorch/dataset/__init__.py index fd9a85fe..4fb0567a 100644 --- a/cv/classification/internimage/pytorch/dataset/__init__.py +++ b/cv/classification/internimage/pytorch/dataset/__init__.py @@ -1,7 +1,9 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- -from .build import build_loader \ No newline at end of file +from .build import build_loader diff --git a/cv/classification/internimage/pytorch/models/build.py b/cv/classification/internimage/pytorch/models/build.py index e18a55c0..74638620 100644 --- a/cv/classification/internimage/pytorch/models/build.py +++ b/cv/classification/internimage/pytorch/models/build.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/models/intern_image.py b/cv/classification/internimage/pytorch/models/intern_image.py index 181b9856..61432482 100644 --- a/cv/classification/internimage/pytorch/models/intern_image.py +++ b/cv/classification/internimage/pytorch/models/intern_image.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/functions/dcnv3_func.py b/cv/classification/internimage/pytorch/ops_dcnv3/functions/dcnv3_func.py index a9ddcc82..13b1f9b9 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/functions/dcnv3_func.py +++ b/cv/classification/internimage/pytorch/ops_dcnv3/functions/dcnv3_func.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/make.sh b/cv/classification/internimage/pytorch/ops_dcnv3/make.sh index f6435e80..12650145 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/make.sh +++ b/cv/classification/internimage/pytorch/ops_dcnv3/make.sh @@ -1,4 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/modules/dcnv3.py b/cv/classification/internimage/pytorch/ops_dcnv3/modules/dcnv3.py index a7d06507..dbd838b6 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/modules/dcnv3.py +++ b/cv/classification/internimage/pytorch/ops_dcnv3/modules/dcnv3.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/setup.py b/cv/classification/internimage/pytorch/ops_dcnv3/setup.py index 28e12fdc..b38fda74 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/setup.py +++ b/cv/classification/internimage/pytorch/ops_dcnv3/setup.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.cu b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.cu index 52840957..6a2e2029 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.cu +++ b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! ************************************************************************************************** * InternImage @@ -171,4 +173,4 @@ dcnv3_cuda_backward(const at::Tensor &input, const at::Tensor &offset, } else { return {grad_input, grad_offset, grad_mask}; } -} \ No newline at end of file +} diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.h b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.h index 069f2829..f52ba73a 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.h +++ b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_cuda.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! ************************************************************************************************** * InternImage diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_im2col_cuda.cuh b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_im2col_cuda.cuh index b551ba3f..9b004d39 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_im2col_cuda.cuh +++ b/cv/classification/internimage/pytorch/ops_dcnv3/src/cuda/dcnv3_im2col_cuda.cuh @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! ************************************************************************************************** * InternImage @@ -1042,4 +1044,4 @@ void dcnv3_col2im_cuda( if (err != cudaSuccess) { printf("error in dcnv3_col2im_cuda: %s\n", cudaGetErrorString(err)); } -} \ No newline at end of file +} diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/src/dcnv3.h b/cv/classification/internimage/pytorch/ops_dcnv3/src/dcnv3.h index 029648e1..b8d5001c 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/src/dcnv3.h +++ b/cv/classification/internimage/pytorch/ops_dcnv3/src/dcnv3.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! ************************************************************************************************** * InternImage diff --git a/cv/classification/internimage/pytorch/ops_dcnv3/test.py b/cv/classification/internimage/pytorch/ops_dcnv3/test.py index 0277bef4..375f7bd5 100644 --- a/cv/classification/internimage/pytorch/ops_dcnv3/test.py +++ b/cv/classification/internimage/pytorch/ops_dcnv3/test.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/optimizer.py b/cv/classification/internimage/pytorch/optimizer.py index 8f75483a..83707edf 100644 --- a/cv/classification/internimage/pytorch/optimizer.py +++ b/cv/classification/internimage/pytorch/optimizer.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/internimage/pytorch/utils.py b/cv/classification/internimage/pytorch/utils.py index 9f5dc945..2b0377fe 100644 --- a/cv/classification/internimage/pytorch/utils.py +++ b/cv/classification/internimage/pytorch/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # InternImage # Copyright (c) 2022 OpenGVLab diff --git a/cv/classification/repvit/pytorch/main.py b/cv/classification/repvit/pytorch/main.py index 1bea89ea..54374da3 100644 --- a/cv/classification/repvit/pytorch/main.py +++ b/cv/classification/repvit/pytorch/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import argparse import datetime import numpy as np diff --git a/cv/classification/repvit/pytorch/model/repvit.py b/cv/classification/repvit/pytorch/model/repvit.py index e7197448..2c1bcf14 100644 --- a/cv/classification/repvit/pytorch/model/repvit.py +++ b/cv/classification/repvit/pytorch/model/repvit.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch.nn as nn def _make_divisible(v, divisor, min_value=None): @@ -474,4 +476,4 @@ def repvit_m2_3(pretrained=False, num_classes = 1000, distillation=False): # [3, 2, 640, 1, 1, 1], # [3, 2, 640, 0, 1, 1] ] - return RepViT(cfgs, num_classes=num_classes, distillation=distillation) \ No newline at end of file + return RepViT(cfgs, num_classes=num_classes, distillation=distillation) diff --git a/cv/classification/swin_transformer/pytorch/config.py b/cv/classification/swin_transformer/pytorch/config.py index fb2921b0..c9390df3 100644 --- a/cv/classification/swin_transformer/pytorch/config.py +++ b/cv/classification/swin_transformer/pytorch/config.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/data/__init__.py b/cv/classification/swin_transformer/pytorch/data/__init__.py index 70c633ce..90b75c27 100644 --- a/cv/classification/swin_transformer/pytorch/data/__init__.py +++ b/cv/classification/swin_transformer/pytorch/data/__init__.py @@ -1 +1,3 @@ -from .build import build_loader \ No newline at end of file +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. +from .build import build_loader diff --git a/cv/classification/swin_transformer/pytorch/lr_scheduler.py b/cv/classification/swin_transformer/pytorch/lr_scheduler.py index 4d27289b..36bb30f8 100644 --- a/cv/classification/swin_transformer/pytorch/lr_scheduler.py +++ b/cv/classification/swin_transformer/pytorch/lr_scheduler.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/main.py b/cv/classification/swin_transformer/pytorch/main.py index dce0fcd4..88d51443 100644 --- a/cv/classification/swin_transformer/pytorch/main.py +++ b/cv/classification/swin_transformer/pytorch/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/main_moe.py b/cv/classification/swin_transformer/pytorch/main_moe.py index acf5d205..6cd4e7f9 100644 --- a/cv/classification/swin_transformer/pytorch/main_moe.py +++ b/cv/classification/swin_transformer/pytorch/main_moe.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/models/build.py b/cv/classification/swin_transformer/pytorch/models/build.py index f7e02f89..aac054e4 100644 --- a/cv/classification/swin_transformer/pytorch/models/build.py +++ b/cv/classification/swin_transformer/pytorch/models/build.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/optimizer.py b/cv/classification/swin_transformer/pytorch/optimizer.py index 3c57ce0b..3c50669a 100644 --- a/cv/classification/swin_transformer/pytorch/optimizer.py +++ b/cv/classification/swin_transformer/pytorch/optimizer.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/swin_transformer/pytorch/utils.py b/cv/classification/swin_transformer/pytorch/utils.py index eb607cfe..f71397a3 100644 --- a/cv/classification/swin_transformer/pytorch/utils.py +++ b/cv/classification/swin_transformer/pytorch/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft diff --git a/cv/classification/wavemlp/pytorch/train.py b/cv/classification/wavemlp/pytorch/train.py index ab9fae79..63a47ec8 100644 --- a/cv/classification/wavemlp/pytorch/train.py +++ b/cv/classification/wavemlp/pytorch/train.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # 2022.02.14-Changed for main script for wavemlp model # Huawei Technologies Co., Ltd. #!/usr/bin/env python diff --git a/cv/detection/fcos/pytorch/fcos/fcos.py b/cv/detection/fcos/pytorch/fcos/fcos.py index b23a3d65..d5e480a4 100755 --- a/cv/detection/fcos/pytorch/fcos/fcos.py +++ b/cv/detection/fcos/pytorch/fcos/fcos.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import cv2, os import torch from fcos_core.config import cfg as base_cfg diff --git a/cv/detection/fcos/pytorch/fcos_core/config/paths_catalog.py b/cv/detection/fcos/pytorch/fcos_core/config/paths_catalog.py index 708a053c..bd80a844 100755 --- a/cv/detection/fcos/pytorch/fcos_core/config/paths_catalog.py +++ b/cv/detection/fcos/pytorch/fcos_core/config/paths_catalog.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Centralized catalog of paths.""" diff --git a/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_conv_cuda.cu b/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_conv_cuda.cu index 087adfe9..d06019ae 100755 --- a/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_conv_cuda.cu +++ b/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_conv_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/deform_conv_cuda.c diff --git a/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_pool_cuda.cu b/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_pool_cuda.cu index 0be4cb86..29a85906 100755 --- a/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_pool_cuda.cu +++ b/cv/detection/fcos/pytorch/fcos_core/csrc/cuda/deform_pool_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/modulated_dcn_cuda.c diff --git a/cv/detection/fcos/pytorch/fcos_core/modeling/rpn/fcos/inference.py b/cv/detection/fcos/pytorch/fcos_core/modeling/rpn/fcos/inference.py index 66796ae5..14f19cc2 100755 --- a/cv/detection/fcos/pytorch/fcos_core/modeling/rpn/fcos/inference.py +++ b/cv/detection/fcos/pytorch/fcos_core/modeling/rpn/fcos/inference.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch from ..inference import RPNPostProcessor diff --git a/cv/detection/fcos/pytorch/fcos_core/utils/c2_model_loading.py b/cv/detection/fcos/pytorch/fcos_core/utils/c2_model_loading.py index 98abfabe..77f17a91 100755 --- a/cv/detection/fcos/pytorch/fcos_core/utils/c2_model_loading.py +++ b/cv/detection/fcos/pytorch/fcos_core/utils/c2_model_loading.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import logging import pickle diff --git a/cv/detection/fcos/pytorch/fcos_core/utils/imports.py b/cv/detection/fcos/pytorch/fcos_core/utils/imports.py index 4d2148fe..d8c26120 100755 --- a/cv/detection/fcos/pytorch/fcos_core/utils/imports.py +++ b/cv/detection/fcos/pytorch/fcos_core/utils/imports.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch diff --git a/cv/detection/rt-detr/pytorch/src/misc/dist.py b/cv/detection/rt-detr/pytorch/src/misc/dist.py index 4c547c00..9f4eb242 100644 --- a/cv/detection/rt-detr/pytorch/src/misc/dist.py +++ b/cv/detection/rt-detr/pytorch/src/misc/dist.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. """ reference - https://github.com/pytorch/vision/blob/main/references/detection/utils.py diff --git a/cv/detection/rt-detr/pytorch/src/nn/backbone/__init__.py b/cv/detection/rt-detr/pytorch/src/nn/backbone/__init__.py index ea44c6b4..30beb6c6 100644 --- a/cv/detection/rt-detr/pytorch/src/nn/backbone/__init__.py +++ b/cv/detection/rt-detr/pytorch/src/nn/backbone/__init__.py @@ -1,5 +1,7 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from .presnet import * from .test_resnet import * -from .common import * \ No newline at end of file +from .common import * diff --git a/cv/detection/rt-detr/pytorch/src/zoo/rtdetr/rtdetr.py b/cv/detection/rt-detr/pytorch/src/zoo/rtdetr/rtdetr.py index 89c05a8e..ab784673 100644 --- a/cv/detection/rt-detr/pytorch/src/zoo/rtdetr/rtdetr.py +++ b/cv/detection/rt-detr/pytorch/src/zoo/rtdetr/rtdetr.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. """by lyuwenyu """ diff --git a/cv/detection/rt-detr/pytorch/tools/export_onnx.py b/cv/detection/rt-detr/pytorch/tools/export_onnx.py index 9e74bb62..c1a8d820 100644 --- a/cv/detection/rt-detr/pytorch/tools/export_onnx.py +++ b/cv/detection/rt-detr/pytorch/tools/export_onnx.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. """by lyuwenyu """ diff --git a/cv/detection/rt-detr/pytorch/tools/train.py b/cv/detection/rt-detr/pytorch/tools/train.py index dd6e490e..73a4f20a 100644 --- a/cv/detection/rt-detr/pytorch/tools/train.py +++ b/cv/detection/rt-detr/pytorch/tools/train.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. """by lyuwenyu """ diff --git a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/implementations/pruning/__init__.py b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/implementations/pruning/__init__.py index e28ae7dc..bdc58b2e 100644 --- a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/implementations/pruning/__init__.py +++ b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/implementations/pruning/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) OpenMMLab. All rights reserved. from . import group_fisher diff --git a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/common_operator_config_utils.py b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/common_operator_config_utils.py index 0a381d5d..39025e10 100644 --- a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/common_operator_config_utils.py +++ b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/common_operator_config_utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) OpenMMLab. All rights reserved. import operator from collections import namedtuple diff --git a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/mapping.py b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/mapping.py index b9cc5372..d22b329a 100644 --- a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/mapping.py +++ b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/structures/quantization/backend_config/mapping.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) OpenMMLab. All rights reserved. import torch diff --git a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/utils/log_tools.py b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/utils/log_tools.py index 787dc192..2146ef56 100644 --- a/cv/distiller/CWD/pytorch/mmrazor/mmrazor/utils/log_tools.py +++ b/cv/distiller/CWD/pytorch/mmrazor/mmrazor/utils/log_tools.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) OpenMMLab. All rights reserved. import logging diff --git a/cv/face/arcface/pytorch/utils/utils.py b/cv/face/arcface/pytorch/utils/utils.py index c8ddd431..7bbbdea8 100755 --- a/cv/face/arcface/pytorch/utils/utils.py +++ b/cv/face/arcface/pytorch/utils/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import numpy as np import torch from PIL import Image @@ -62,4 +64,4 @@ def show_config(**kwargs): print('-' * 70) for key, value in kwargs.items(): print('|%25s | %40s|' % (str(key), str(value))) - print('-' * 70) \ No newline at end of file + print('-' * 70) diff --git a/cv/face/facenet/pytorch/utils/dataloader.py b/cv/face/facenet/pytorch/utils/dataloader.py index 55485442..089baccf 100644 --- a/cv/face/facenet/pytorch/utils/dataloader.py +++ b/cv/face/facenet/pytorch/utils/dataloader.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import random diff --git a/cv/face/facenet/pytorch/utils/utils.py b/cv/face/facenet/pytorch/utils/utils.py index 591540a7..a794bc2a 100644 --- a/cv/face/facenet/pytorch/utils/utils.py +++ b/cv/face/facenet/pytorch/utils/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import numpy as np import torch from PIL import Image @@ -60,4 +62,4 @@ def show_config(**kwargs): print('-' * 70) for key, value in kwargs.items(): print('|%25s | %40s|' % (str(key), str(value))) - print('-' * 70) \ No newline at end of file + print('-' * 70) diff --git a/cv/instance_segmentation/yolact/pytorch/data/config.py b/cv/instance_segmentation/yolact/pytorch/data/config.py index 24dba350..c9b4e744 100644 --- a/cv/instance_segmentation/yolact/pytorch/data/config.py +++ b/cv/instance_segmentation/yolact/pytorch/data/config.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from backbone import ResNetBackbone, VGGBackbone, ResNetBackboneGN, DarkNetBackbone from math import sqrt import torch diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/dcn_v2.py b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/dcn_v2.py index ce654b5c..54b16f9c 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/dcn_v2.py +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/dcn_v2.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/env python from __future__ import absolute_import, division, print_function diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/setup.py b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/setup.py index ad9814a4..e32e96ab 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/setup.py +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/setup.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/env python import glob diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cpu/dcn_v2_cpu.cpp b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cpu/dcn_v2_cpu.cpp index 6c0e7804..8baea750 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cpu/dcn_v2_cpu.cpp +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cpu/dcn_v2_cpu.cpp @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include "cpu/dcn_v2_im2col_cpu.h" diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_cuda.cu b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_cuda.cu index 22adbb12..d2951bc2 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_cuda.cu +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include "dcn_v2_im2col_cuda.h" diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_im2col_cuda.cu b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_im2col_cuda.cu index 4140eacf..7a3245f0 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_im2col_cuda.cu +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_im2col_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include "dcn_v2_im2col_cuda.h" #include #include @@ -399,4 +401,4 @@ void modulated_deformable_col2im_coord_cuda(cudaStream_t stream, { printf("error in modulated_deformable_col2im_coord_cuda: %s\n", cudaGetErrorString(err)); } -} \ No newline at end of file +} diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_psroi_pooling_cuda.cu b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_psroi_pooling_cuda.cu index 01902171..2532d2bb 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_psroi_pooling_cuda.cu +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/dcn_v2_psroi_pooling_cuda.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! * Copyright (c) 2017 Microsoft * Licensed under The MIT License [see LICENSE for details] diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/vision.h b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/vision.h index f3672b11..ed3411d0 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/vision.h +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/cuda/vision.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #pragma once #include #include @@ -57,4 +59,4 @@ dcn_v2_psroi_pooling_cuda_backward(const at::Tensor &out_grad, const int pooled_size, const int part_size, const int sample_per_part, - const float trans_std); \ No newline at end of file + const float trans_std); diff --git a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/dcn_v2.h b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/dcn_v2.h index de670bf9..41fbf42c 100644 --- a/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/dcn_v2.h +++ b/cv/instance_segmentation/yolact/pytorch/external/DCNv2/src/dcn_v2.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #pragma once #include "cpu/vision.h" @@ -187,4 +189,4 @@ dcn_v2_psroi_pooling_backward(const at::Tensor &out_grad, sample_per_part, trans_std); } -} \ No newline at end of file +} diff --git a/cv/instance_segmentation/yolact/pytorch/train.py b/cv/instance_segmentation/yolact/pytorch/train.py index 5394308f..cefa68b2 100644 --- a/cv/instance_segmentation/yolact/pytorch/train.py +++ b/cv/instance_segmentation/yolact/pytorch/train.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath diff --git a/cv/point_cloud/Point-BERT/pytorch/extensions/emd/cuda/emd_kernel.cu b/cv/point_cloud/Point-BERT/pytorch/extensions/emd/cuda/emd_kernel.cu index 4744a81f..533ccf33 100644 --- a/cv/point_cloud/Point-BERT/pytorch/extensions/emd/cuda/emd_kernel.cu +++ b/cv/point_cloud/Point-BERT/pytorch/extensions/emd/cuda/emd_kernel.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /********************************** * Original Author: Haoqiang Fan * Modified by: Kaichun Mo diff --git a/cv/point_cloud/Point-BERT/pytorch/install.sh b/cv/point_cloud/Point-BERT/pytorch/install.sh index a0163fb4..9afa0ab0 100644 --- a/cv/point_cloud/Point-BERT/pytorch/install.sh +++ b/cv/point_cloud/Point-BERT/pytorch/install.sh @@ -1,3 +1,6 @@ +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/env sh HOME=`pwd` diff --git a/cv/point_cloud/Point-BERT/pytorch/main_BERT.py b/cv/point_cloud/Point-BERT/pytorch/main_BERT.py index 95a6520a..5be5f8ef 100644 --- a/cv/point_cloud/Point-BERT/pytorch/main_BERT.py +++ b/cv/point_cloud/Point-BERT/pytorch/main_BERT.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from sklearn.svm import LinearSVC from tools import BERT_pretrain_run_net as pretrain from tools import BERT_finetune_run_net as finetune diff --git a/cv/point_cloud/Point-BERT/pytorch/models/dvae.py b/cv/point_cloud/Point-BERT/pytorch/models/dvae.py index 1c1d96f0..b3b4e213 100644 --- a/cv/point_cloud/Point-BERT/pytorch/models/dvae.py +++ b/cv/point_cloud/Point-BERT/pytorch/models/dvae.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch.nn as nn import torch import torch.nn.functional as F diff --git a/cv/point_cloud/Point-BERT/pytorch/scripts/dist_train_BERT.sh b/cv/point_cloud/Point-BERT/pytorch/scripts/dist_train_BERT.sh index 519b149a..a4b447ae 100644 --- a/cv/point_cloud/Point-BERT/pytorch/scripts/dist_train_BERT.sh +++ b/cv/point_cloud/Point-BERT/pytorch/scripts/dist_train_BERT.sh @@ -1,4 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. set -x NGPUS=$1 diff --git a/cv/point_cloud/Point-BERT/pytorch/scripts/train.sh b/cv/point_cloud/Point-BERT/pytorch/scripts/train.sh index 3600f1c9..2e958132 100644 --- a/cv/point_cloud/Point-BERT/pytorch/scripts/train.sh +++ b/cv/point_cloud/Point-BERT/pytorch/scripts/train.sh @@ -1,4 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. set -x GPUS=$1 diff --git a/cv/point_cloud/Point-BERT/pytorch/tools/runner_BERT_finetune.py b/cv/point_cloud/Point-BERT/pytorch/tools/runner_BERT_finetune.py index 7aaa71ec..cc1653d1 100644 --- a/cv/point_cloud/Point-BERT/pytorch/tools/runner_BERT_finetune.py +++ b/cv/point_cloud/Point-BERT/pytorch/tools/runner_BERT_finetune.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch import torch.nn as nn from tools import builder diff --git a/cv/pose/alphapose/pytorch/alphapose/datasets/__init__.py b/cv/pose/alphapose/pytorch/alphapose/datasets/__init__.py index 5b5b469e..da406bba 100755 --- a/cv/pose/alphapose/pytorch/alphapose/datasets/__init__.py +++ b/cv/pose/alphapose/pytorch/alphapose/datasets/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from .coco_det import Mscoco_det from .concat_dataset import ConcatDataset from .custom import CustomDataset diff --git a/cv/pose/alphapose/pytorch/alphapose/models/__init__.py b/cv/pose/alphapose/pytorch/alphapose/models/__init__.py index 3396056d..64b7ba83 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/__init__.py +++ b/cv/pose/alphapose/pytorch/alphapose/models/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from .fastpose import FastPose # from .fastpose_duc import FastPose_DUC from .hrnet import PoseHighResolutionNet diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/Resnet.py b/cv/pose/alphapose/pytorch/alphapose/models/layers/Resnet.py index 6bd28b68..63614fbb 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/Resnet.py +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/Resnet.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/ShuffleResnet.py b/cv/pose/alphapose/pytorch/alphapose/models/layers/ShuffleResnet.py index f1ccc69c..b6abe9b5 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/ShuffleResnet.py +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/ShuffleResnet.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda.cpp b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda.cpp index a07426a0..00c4dd7f 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda.cpp +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda.cpp @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/deform_conv_cuda.c @@ -698,4 +700,4 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { m.def("modulated_deform_conv_cuda_backward", &modulated_deform_conv_cuda_backward, "modulated deform conv backward (CUDA)"); -} \ No newline at end of file +} diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda_kernel.cu b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda_kernel.cu index a2b94286..98cc0c83 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda_kernel.cu +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_conv_cuda_kernel.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! ******************* BEGIN Caffe Copyright Notice and Disclaimer **************** * diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda.cpp b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda.cpp index 9e0e3ffc..a83dd91d 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda.cpp +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda.cpp @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/modulated_dcn_cuda.c diff --git a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda_kernel.cu b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda_kernel.cu index 1922d724..13aefab8 100755 --- a/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda_kernel.cu +++ b/cv/pose/alphapose/pytorch/alphapose/models/layers/dcn/src/deform_pool_cuda_kernel.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ /*! * Copyright (c) 2017 Microsoft * Licensed under The MIT License [see LICENSE for details] @@ -361,4 +363,4 @@ void DeformablePSROIPoolBackwardAcc(const at::Tensor out_grad, { printf("error in DeformablePSROIPoolForward: %s\n", cudaGetErrorString(err)); } -} \ No newline at end of file +} diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/bbox.py b/cv/pose/alphapose/pytorch/alphapose/utils/bbox.py index a9e00764..ffa28865 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/bbox.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/bbox.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from __future__ import division import torch diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/detector.py b/cv/pose/alphapose/pytorch/alphapose/utils/detector.py index ba8e3946..388fdac0 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/detector.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/detector.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import sys from threading import Thread diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/file_detector.py b/cv/pose/alphapose/pytorch/alphapose/utils/file_detector.py index b3171944..8633c775 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/file_detector.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/file_detector.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from itertools import count from threading import Thread from queue import Queue diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/metrics.py b/cv/pose/alphapose/pytorch/alphapose/utils/metrics.py index 9affe087..d82888b1 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/metrics.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/metrics.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com), Haoyi Zhu diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/pPose_nms.py b/cv/pose/alphapose/pytorch/alphapose/utils/pPose_nms.py index 358d6ec4..48727b0c 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/pPose_nms.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/pPose_nms.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -*- coding: utf-8 -*- import json import os diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/presets/__init__.py b/cv/pose/alphapose/pytorch/alphapose/utils/presets/__init__.py index 0c91f83f..b8a708a0 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/presets/__init__.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/presets/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from .simple_transform import SimpleTransform __all__ = ['SimpleTransform'] diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/presets/simple_transform.py b/cv/pose/alphapose/pytorch/alphapose/utils/presets/simple_transform.py index ce72dd43..c8db5d7c 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/presets/simple_transform.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/presets/simple_transform.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com), Haoyi Zhu diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/__init__.py b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/__init__.py index 0b56d3f6..25262c73 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/__init__.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # from .roi_align import roi_align, RoIAlign from torchvision.ops import roi_align from .roi_align import RoIAlign diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/roi_align.py b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/roi_align.py index 111e05f9..3c634f84 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/roi_align.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/roi_align.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_cuda.cpp b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_cuda.cpp index 4e608161..149a1cce 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_cuda.cpp +++ b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_cuda.cpp @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include @@ -82,4 +84,4 @@ int roi_align_backward_cuda(at::Tensor top_grad, at::Tensor rois, PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { m.def("forward", &roi_align_forward_cuda, "Roi_Align forward (CUDA)"); m.def("backward", &roi_align_backward_cuda, "Roi_Align backward (CUDA)"); -} \ No newline at end of file +} diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_kernel.cu b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_kernel.cu index b914fd1e..d57b93f6 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_kernel.cu +++ b/cv/pose/alphapose/pytorch/alphapose/utils/roi_align/src/roi_align_kernel.cu @@ -1,3 +1,5 @@ +/* Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. */ +/* All Rights Reserved. */ #include #include @@ -291,4 +293,4 @@ int ROIAlignBackwardLaucher(const at::Tensor top_grad, const at::Tensor rois, })); THCudaCheck(cudaGetLastError()); return 1; -} \ No newline at end of file +} diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/transforms.py b/cv/pose/alphapose/pytorch/alphapose/utils/transforms.py index b3b97cec..beb9a2c3 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/transforms.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/transforms.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/vis.py b/cv/pose/alphapose/pytorch/alphapose/utils/vis.py index a97204bb..85854611 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/vis.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/vis.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import math import time diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/webcam_detector.py b/cv/pose/alphapose/pytorch/alphapose/utils/webcam_detector.py index b5e86482..f3386c97 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/webcam_detector.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/webcam_detector.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from itertools import count from threading import Thread from queue import Queue diff --git a/cv/pose/alphapose/pytorch/alphapose/utils/writer.py b/cv/pose/alphapose/pytorch/alphapose/utils/writer.py index 6c75bbc3..7a785e05 100755 --- a/cv/pose/alphapose/pytorch/alphapose/utils/writer.py +++ b/cv/pose/alphapose/pytorch/alphapose/utils/writer.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import time from threading import Thread diff --git a/cv/pose/alphapose/pytorch/alphapose/version.py b/cv/pose/alphapose/pytorch/alphapose/version.py index f1dd86c4..821d63fa 100755 --- a/cv/pose/alphapose/pytorch/alphapose/version.py +++ b/cv/pose/alphapose/pytorch/alphapose/version.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # GENERATED VERSION FILE # TIME: Thu Dec 23 15:56:55 2021 diff --git a/cv/pose/alphapose/pytorch/detector/nms/__init__.py b/cv/pose/alphapose/pytorch/detector/nms/__init__.py index d9196b39..6cd746a7 100755 --- a/cv/pose/alphapose/pytorch/detector/nms/__init__.py +++ b/cv/pose/alphapose/pytorch/detector/nms/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # from .nms_wrapper import nms, soft_nms from torchvision.ops import nms soft_nms = nms diff --git a/cv/pose/alphapose/pytorch/detector/yolo/preprocess.py b/cv/pose/alphapose/pytorch/detector/yolo/preprocess.py index 11b55438..b0365090 100755 --- a/cv/pose/alphapose/pytorch/detector/yolo/preprocess.py +++ b/cv/pose/alphapose/pytorch/detector/yolo/preprocess.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from __future__ import division import torch diff --git a/cv/pose/alphapose/pytorch/detector/yolo/util.py b/cv/pose/alphapose/pytorch/detector/yolo/util.py index e6aeac08..2833bbfb 100755 --- a/cv/pose/alphapose/pytorch/detector/yolo/util.py +++ b/cv/pose/alphapose/pytorch/detector/yolo/util.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from __future__ import division diff --git a/cv/semantic_segmentation/bisenetv2/pytorch/lib/logger.py b/cv/semantic_segmentation/bisenetv2/pytorch/lib/logger.py index 29f6054c..547ff32b 100755 --- a/cv/semantic_segmentation/bisenetv2/pytorch/lib/logger.py +++ b/cv/semantic_segmentation/bisenetv2/pytorch/lib/logger.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/python # -*- encoding: utf-8 -*- diff --git a/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv1.py b/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv1.py index 678b6f85..e7a0d819 100755 --- a/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv1.py +++ b/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv1.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/python # -*- encoding: utf-8 -*- diff --git a/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv2.py b/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv2.py index c8307d85..22bd36a6 100755 --- a/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv2.py +++ b/cv/semantic_segmentation/bisenetv2/pytorch/lib/models/bisenetv2.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch import torch.nn as nn diff --git a/cv/semantic_segmentation/bisenetv2/pytorch/tools/export_onnx.py b/cv/semantic_segmentation/bisenetv2/pytorch/tools/export_onnx.py index 7acd98e0..4de1ea4d 100755 --- a/cv/semantic_segmentation/bisenetv2/pytorch/tools/export_onnx.py +++ b/cv/semantic_segmentation/bisenetv2/pytorch/tools/export_onnx.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import argparse import os.path as osp import sys diff --git a/cv/semantic_segmentation/bisenetv2/pytorch/tools/train_amp.py b/cv/semantic_segmentation/bisenetv2/pytorch/tools/train_amp.py index 08207d03..d34a9e07 100755 --- a/cv/semantic_segmentation/bisenetv2/pytorch/tools/train_amp.py +++ b/cv/semantic_segmentation/bisenetv2/pytorch/tools/train_amp.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. #!/usr/bin/python # -*- encoding: utf-8 -*- diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/config/default.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/config/default.py index 983cc88d..ad3544a9 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/config/default.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/config/default.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/config/models.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/config/models.py index 05e81104..1db003f9 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/config/models.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/config/models.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/core/criterion.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/core/criterion.py index e6b942c9..1446ef9d 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/core/criterion.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/core/criterion.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. @@ -55,4 +57,4 @@ class OhemCrossEntropy(nn.Module): pixel_losses = pixel_losses[mask][ind] pixel_losses = pixel_losses[pred < threshold] - return pixel_losses.mean() \ No newline at end of file + return pixel_losses.mean() diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/__init__.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/__init__.py index 79a5382a..692a44d1 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/__init__.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. @@ -10,4 +12,4 @@ from __future__ import print_function from .cityscapes import Cityscapes as cityscapes from .lip import LIP as lip -from .pascal_ctx import PASCALContext as pascal_ctx \ No newline at end of file +from .pascal_ctx import PASCALContext as pascal_ctx diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/base_dataset.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/base_dataset.py index effb03d1..de55a62b 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/base_dataset.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/base_dataset.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/cityscapes.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/cityscapes.py index 25801453..3c6ec481 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/cityscapes.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/cityscapes.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/lip.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/lip.py index a89ef862..1a13a0d2 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/lip.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/lip.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/pascal_ctx.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/pascal_ctx.py index 5da39c9b..46ed0b3b 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/pascal_ctx.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/datasets/pascal_ctx.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/models/__init__.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/models/__init__.py index a2e350dc..02f941cb 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/models/__init__.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/models/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. @@ -8,4 +10,4 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -import models.seg_hrnet \ No newline at end of file +import models.seg_hrnet diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/models/seg_hrnet.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/models/seg_hrnet.py index a6d20bcd..05801c87 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/models/seg_hrnet.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/models/seg_hrnet.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/semantic_segmentation/ocrnet/pytorch/lib/utils/utils.py b/cv/semantic_segmentation/ocrnet/pytorch/lib/utils/utils.py index 00a98713..05dedb28 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/lib/utils/utils.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/lib/utils/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. @@ -143,4 +145,4 @@ def adjust_learning_rate(optimizer, base_lr, max_iters, cur_iters, power=0.9): lr = base_lr*((1-float(cur_iters)/max_iters)**(power)) optimizer.param_groups[0]['lr'] = lr - return lr \ No newline at end of file + return lr diff --git a/cv/semantic_segmentation/ocrnet/pytorch/tools/test.py b/cv/semantic_segmentation/ocrnet/pytorch/tools/test.py index 5cf7e0bc..55d49fd1 100644 --- a/cv/semantic_segmentation/ocrnet/pytorch/tools/test.py +++ b/cv/semantic_segmentation/ocrnet/pytorch/tools/test.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. diff --git a/cv/super_resolution/ttvsr/pytorch/mmedit/models/__init__.py b/cv/super_resolution/ttvsr/pytorch/mmedit/models/__init__.py index 6038238c..b3806b2e 100755 --- a/cv/super_resolution/ttvsr/pytorch/mmedit/models/__init__.py +++ b/cv/super_resolution/ttvsr/pytorch/mmedit/models/__init__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from .backbones import * # noqa: F401, F403 from .base import BaseModel from .builder import (build, build_backbone, build_component, build_loss, diff --git a/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/clip.py b/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/clip.py index eb900cb0..11621734 100644 --- a/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/clip.py +++ b/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/clip.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import hashlib import os import urllib diff --git a/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/model.py b/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/model.py index f7958f17..50a8bdf3 100644 --- a/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/model.py +++ b/multimodal/Language-Image_Pre-Training/clip/pytorch/clip/model.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. from collections import OrderedDict from typing import Tuple, Union diff --git a/multimodal/diffusion/ControlNet/cldm/logger.py b/multimodal/diffusion/ControlNet/cldm/logger.py index d0924804..fe77183c 100644 --- a/multimodal/diffusion/ControlNet/cldm/logger.py +++ b/multimodal/diffusion/ControlNet/cldm/logger.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import numpy as np diff --git a/multimodal/diffusion/ControlNet/config.py b/multimodal/diffusion/ControlNet/config.py index 8e5bfdca..e4d22342 100644 --- a/multimodal/diffusion/ControlNet/config.py +++ b/multimodal/diffusion/ControlNet/config.py @@ -1 +1,3 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. save_memory = True diff --git a/multimodal/diffusion/ControlNet/ldm/models/diffusion/ddpm.py b/multimodal/diffusion/ControlNet/ldm/models/diffusion/ddpm.py index 50df5a40..70fffd9a 100644 --- a/multimodal/diffusion/ControlNet/ldm/models/diffusion/ddpm.py +++ b/multimodal/diffusion/ControlNet/ldm/models/diffusion/ddpm.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. """ wild mixture of https://github.com/lucidrains/denoising-diffusion-pytorch/blob/7706bdfc6f527f58d33f84b7b522e61e6e3164b3/denoising_diffusion_pytorch/denoising_diffusion_pytorch.py diff --git a/multimodal/diffusion/ddpm/main.py b/multimodal/diffusion/ddpm/main.py index c6875501..90ea9496 100644 --- a/multimodal/diffusion/ddpm/main.py +++ b/multimodal/diffusion/ddpm/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import copy import json import os diff --git a/multimodal/diffusion/ddpm/score/inception.py b/multimodal/diffusion/ddpm/score/inception.py index 5c9277d1..5e8ae43a 100644 --- a/multimodal/diffusion/ddpm/score/inception.py +++ b/multimodal/diffusion/ddpm/score/inception.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import torch import torch.nn as nn import torch.nn.functional as F diff --git a/nlp/llm/baichuan2-7b/Baichuan2/fine-tune/fine-tune.py b/nlp/llm/baichuan2-7b/Baichuan2/fine-tune/fine-tune.py index ace69dbc..354c3014 100644 --- a/nlp/llm/baichuan2-7b/Baichuan2/fine-tune/fine-tune.py +++ b/nlp/llm/baichuan2-7b/Baichuan2/fine-tune/fine-tune.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. import os import math import pathlib diff --git a/speech/speech_recognition/rnnt/pytorch/common/data/dali/iterator.py b/speech/speech_recognition/rnnt/pytorch/common/data/dali/iterator.py index 76d34e02..29c50a2b 100644 --- a/speech/speech_recognition/rnnt/pytorch/common/data/dali/iterator.py +++ b/speech/speech_recognition/rnnt/pytorch/common/data/dali/iterator.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/speech/speech_recognition/rnnt/pytorch/inference.py b/speech/speech_recognition/rnnt/pytorch/inference.py index 252560a6..5a7deb4f 100644 --- a/speech/speech_recognition/rnnt/pytorch/inference.py +++ b/speech/speech_recognition/rnnt/pytorch/inference.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/speech/speech_recognition/rnnt/pytorch/scripts/create_sentencepieces.sh b/speech/speech_recognition/rnnt/pytorch/scripts/create_sentencepieces.sh index b1901a02..6a29fdd2 100644 --- a/speech/speech_recognition/rnnt/pytorch/scripts/create_sentencepieces.sh +++ b/speech/speech_recognition/rnnt/pytorch/scripts/create_sentencepieces.sh @@ -1,3 +1,6 @@ +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2022 Iluvatar CoreX. All rights reserved. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # diff --git a/speech/speech_recognition/rnnt/pytorch/scripts/docker/launch.sh b/speech/speech_recognition/rnnt/pytorch/scripts/docker/launch.sh index 0abcdd83..a8cabfae 100755 --- a/speech/speech_recognition/rnnt/pytorch/scripts/docker/launch.sh +++ b/speech/speech_recognition/rnnt/pytorch/scripts/docker/launch.sh @@ -1,3 +1,6 @@ +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +16,6 @@ # limitations under the License. -#!/bin/bash LOG_DIR=$1 diff --git a/speech/speech_recognition/rnnt/pytorch/scripts/download_librispeech.sh b/speech/speech_recognition/rnnt/pytorch/scripts/download_librispeech.sh index be716202..f3d5e6a1 100755 --- a/speech/speech_recognition/rnnt/pytorch/scripts/download_librispeech.sh +++ b/speech/speech_recognition/rnnt/pytorch/scripts/download_librispeech.sh @@ -1,3 +1,6 @@ +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2022 Iluvatar CoreX. All rights reserved. # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # @@ -14,7 +17,6 @@ # limitations under the License. -#!/usr/bin/env bash DATA_ROOT_DIR=$1 DATA_SET="LibriSpeech" @@ -29,4 +31,4 @@ DATA_DIR="${DATA_ROOT_DIR}/${DATA_SET}" # fi chmod go+rx $DATA_DIR -python3 utils/download_librispeech.py utils/librispeech.csv $DATA_DIR -e ${DATA_ROOT_DIR}/ \ No newline at end of file +python3 utils/download_librispeech.py utils/librispeech.csv $DATA_DIR -e ${DATA_ROOT_DIR}/ diff --git a/speech/speech_recognition/rnnt/pytorch/scripts/inference.sh b/speech/speech_recognition/rnnt/pytorch/scripts/inference.sh index 0c798a0b..ce3f8a6f 100755 --- a/speech/speech_recognition/rnnt/pytorch/scripts/inference.sh +++ b/speech/speech_recognition/rnnt/pytorch/scripts/inference.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # diff --git a/speech/speech_recognition/rnnt/pytorch/scripts/preprocess_librispeech.sh b/speech/speech_recognition/rnnt/pytorch/scripts/preprocess_librispeech.sh index cf07f0a8..6bc1e73b 100755 --- a/speech/speech_recognition/rnnt/pytorch/scripts/preprocess_librispeech.sh +++ b/speech/speech_recognition/rnnt/pytorch/scripts/preprocess_librispeech.sh @@ -1,3 +1,6 @@ +#!/bin/bash +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2022 Iluvatar CoreX. All rights reserved. # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # @@ -13,7 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/usr/bin/env bash DATA_DIR=$1 diff --git a/speech/speech_recognition/rnnt/pytorch/train.py b/speech/speech_recognition/rnnt/pytorch/train.py index b74c5ef7..d0a5189f 100644 --- a/speech/speech_recognition/rnnt/pytorch/train.py +++ b/speech/speech_recognition/rnnt/pytorch/train.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2022 Iluvatar CoreX. All rights reserved. # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # diff --git a/speech/speech_recognition/rnnt/pytorch/utils/download_librispeech.py b/speech/speech_recognition/rnnt/pytorch/utils/download_librispeech.py index 32468641..960dc20b 100644 --- a/speech/speech_recognition/rnnt/pytorch/utils/download_librispeech.py +++ b/speech/speech_recognition/rnnt/pytorch/utils/download_librispeech.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/speech/speech_synthesis/vqmivc/pytorch/preprocess.py b/speech/speech_synthesis/vqmivc/pytorch/preprocess.py index bc538bc8..afbb739a 100644 --- a/speech/speech_synthesis/vqmivc/pytorch/preprocess.py +++ b/speech/speech_synthesis/vqmivc/pytorch/preprocess.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # -*- coding: utf-8 -*- from spectrogram import logmelspectrogram diff --git a/speech/speech_synthesis/waveglow/pytorch/glow.py b/speech/speech_synthesis/waveglow/pytorch/glow.py index 85717a08..0d1e606a 100644 --- a/speech/speech_synthesis/waveglow/pytorch/glow.py +++ b/speech/speech_synthesis/waveglow/pytorch/glow.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # diff --git a/speech/speech_synthesis/waveglow/pytorch/train.py b/speech/speech_synthesis/waveglow/pytorch/train.py index 0d1f040e..34ea4df4 100644 --- a/speech/speech_synthesis/waveglow/pytorch/train.py +++ b/speech/speech_synthesis/waveglow/pytorch/train.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. # ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # -- Gitee