Repository Analysis

pytorch/vision

Datasets, Transforms and Models specific to Computer Vision

16.4 Moderate AI signal View on GitHub
16.4
Adjusted Score
16.4
Raw Score
100%
Time Factor
2026-05-30
Last Push
17,704
Stars
Python
Language
129,332
Lines of Code
483
Files
1710
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 138MEDIUM 67LOW 1505

Pattern Findings

1710 matches across 13 categories. Click a row to expand file-level details.

Cross-File Repetition126 hits · 630 pts
SeverityFileLineSnippet
HIGHreferences/classification/utils.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/depth/stereo/utils/logger.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/segmentation/utils.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/video_classification/utils.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/optical_flow/utils.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/detection/utils.py0track a series of values and provide access to smoothed values over a window or the global series average.
HIGHreferences/classification/utils.py0this function disables printing when not in master process
HIGHreferences/segmentation/utils.py0this function disables printing when not in master process
HIGHreferences/video_classification/utils.py0this function disables printing when not in master process
HIGHreferences/detection/utils.py0this function disables printing when not in master process
HIGHreferences/depth/stereo/utils/losses.py0loss function defined over sequence of flow predictions
HIGHreferences/depth/stereo/utils/losses.py0loss function defined over sequence of flow predictions
HIGHreferences/optical_flow/utils.py0loss function defined over sequence of flow predictions
HIGHtorchvision/datasets/stl10.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/usps.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/svhn.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/semeion.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/cifar.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/caltech.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/mnist.py0args: index (int): index returns: tuple: (image, target) where target is index of the target class.
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``(
HIGHtorchvision/datasets/_stereo_matching.py0return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``(
HIGHtorchvision/models/shufflenetv2.py0these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra
HIGHtorchvision/models/shufflenetv2.py0these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra
HIGHtorchvision/models/mnasnet.py0these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra
HIGHtorchvision/models/mnasnet.py0these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra
HIGHtorchvision/models/resnet.py0these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/squeezenet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/resnet.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/mobilenetv2.py0these weights reproduce closely the results of the paper using a simple training recipe.
HIGHtorchvision/models/regnet.py0these weights improve upon the results of the original paper by using a modified version of torchvision's `new training
HIGHtorchvision/models/regnet.py0these weights improve upon the results of the original paper by using a modified version of torchvision's `new training
HIGHtorchvision/models/regnet.py0these weights improve upon the results of the original paper by using a modified version of torchvision's `new training
66 more matches not shown…
Hyper-Verbose Identifiers600 hits · 508 pts
SeverityFileLineSnippet
LOWtest/smoke_test.py24def smoke_test_torchvision_read_decode() -> None:
LOWtest/smoke_test.py69def smoke_test_torchvision_decode_jpeg(device: str = "cpu"):
LOWtest/builtin_dataset_mocks.py122def parametrize_dataset_mocks(*dataset_mocks, marks=None):
LOWtest/builtin_dataset_mocks.py803 def _make_detection_anns_folder(cls, root, name, *, file_name_fn, num_examples):
LOWtest/builtin_dataset_mocks.py928 def _make_bounding_boxes_file(cls, root, image_file_names):
LOWtest/builtin_dataset_mocks.py1230 def _meta_to_split_and_classification_ann(cls, meta, idx):
LOWtest/test_utils.py42def test_make_grid_not_inplace():
LOWtest/test_utils.py56def test_normalize_in_make_grid():
LOWtest/test_utils.py83def test_save_image_single_pixel():
LOWtest/test_utils.py91def test_save_image_file_object():
LOWtest/test_utils.py103def test_save_image_single_pixel_file_object():
LOWtest/test_utils.py138def test_draw_boxes_with_coloured_labels():
LOWtest/test_utils.py153def test_draw_boxes_with_coloured_label_backgrounds():
LOWtest/test_utils.py170def test_draw_boxes_with_coloured_label_text_boxes():
LOWtest/test_utils.py208def test_draw_rotated_boxes_fill():
LOWtest/test_utils.py262def test_draw_boxes_grayscale():
LOWtest/test_utils.py321def test_draw_segmentation_masks(colors, alpha, device):
LOWtest/test_utils.py363def test_draw_segmentation_masks_dtypes():
LOWtest/test_utils.py384def test_draw_segmentation_masks_errors(device):
LOWtest/test_utils.py421def test_draw_no_segmention_mask(device):
LOWtest/test_utils.py430def test_draw_keypoints_vanilla():
LOWtest/test_utils.py465def test_draw_keypoints_colored(colors):
LOWtest/test_utils.py492def test_draw_keypoints_visibility(connectivity, vis):
LOWtest/test_utils.py531def test_draw_keypoints_visibility_default():
LOWtest/test_utils.py555def test_draw_keypoints_dtypes():
LOWtest/test_utils.py571def test_draw_keypoints_errors():
LOWtest/test_utils.py636def test_flow_to_image_errors(input_flow, match):
LOWtest/conftest.py25def pytest_collection_modifyitems(items):
LOWtest/test_transforms_video.py40 def test_random_resized_crop_video(self):
LOWtest/test_transforms_video.py116 def samples_from_standard_normal(tensor):
LOWtest/test_transforms_video.py164 def test_random_horizontal_flip_video(self, p):
LOWtest/test_prototype_datasets_utils.py129 def test_priority_decompressed_gt_raw(self, tmp_path):
LOWtest/test_prototype_datasets_utils.py142 def test_priority_extracted_gt_decompressed(self, tmp_path):
LOWtest/test_prototype_datasets_utils.py177 def test_preprocess_decompress(self, tmp_path, preprocess):
LOWtest/test_prototype_datasets_utils.py218 def test_preprocess_only_after_download(self, tmp_path):
LOWtest/test_prototype_datasets_utils.py287def test_missing_dependency_error():
LOWtest/test_datasets_utils.py49 def test_get_redirect_url_max_hops_exceeded(self, mocker):
LOWtest/test_datasets_utils.py81 def test_get_google_drive_file_id(self):
LOWtest/test_datasets_utils.py88 def test_get_google_drive_file_id_invalid_url(self):
LOWtest/test_datasets_utils.py116 def test_detect_file_type_incompatible(self, file):
LOWtest/test_datasets_utils.py145 def test_decompress_no_compression(self):
LOWtest/test_datasets_utils.py150 def test_decompress_remove_finished(self, tmpdir, use_pathlib):
LOWtest/test_datasets_utils.py178 def test_extract_archive_defer_to_decompress(self, extension, remove_finished, mocker):
LOWtest/test_datasets_utils.py270def test_make_dataset_no_valid_files(tmpdir, kwargs, expected_error_msg):
LOWtest/test_datasets.py149 def _create_annotation_folder(self, root, name, file_name_fn, num_examples):
LOWtest/test_datasets.py385 def test_feature_types_target_color(self):
LOWtest/test_datasets.py391 def test_feature_types_target_polygon(self):
LOWtest/test_datasets.py1053 def test_not_found_or_corrupted(self):
LOWtest/test_datasets.py1330 def test_not_found_or_corrupted(self):
LOWtest/test_datasets.py1700 def _is_valid_file_to_extensions(self, is_valid_file):
LOWtest/test_datasets.py1992 def test_tv_decode_image_support(self):
LOWtest/test_datasets.py2727 def _meta_to_split_and_classification_ann(self, meta, idx):
LOWtest/test_datasets.py3403 def _create_annotation_folder(num_examples: int, root_dir: str):
LOWtest/test_datasets.py3511 def test_augmented_view_usage(self):
LOWtest/test_datasets_video_utils.py72 def test_video_clips_custom_fps(self, tmpdir):
LOWtest/test_datasets_video_utils.py83 def test_compute_clips_for_video(self):
LOWtest/test_backbone_utils.py98 def _create_feature_extractor(self, *args, **kwargs):
LOWtest/test_backbone_utils.py131 def test_build_fx_feature_extractor(self, model_name):
LOWtest/test_backbone_utils.py162 def test_node_name_conventions(self):
LOWtest/test_backbone_utils.py186 def test_feature_extraction_methods_equivalence(self):
540 more matches not shown…
Unused Imports654 hits · 467 pts
SeverityFileLineSnippet
LOWhubconf.py4
LOWhubconf.py4
LOWhubconf.py5
LOWhubconf.py6
LOWhubconf.py6
LOWhubconf.py6
LOWhubconf.py6
LOWhubconf.py7
LOWhubconf.py7
LOWhubconf.py7
LOWhubconf.py7
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py8
LOWhubconf.py21
LOWhubconf.py22
LOWhubconf.py23
LOWhubconf.py24
LOWhubconf.py24
LOWhubconf.py24
LOWhubconf.py24
LOWhubconf.py25
LOWhubconf.py26
LOWhubconf.py26
LOWhubconf.py27
LOWhubconf.py27
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py28
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py45
LOWhubconf.py57
594 more matches not shown…
Decorative Section Separators49 hits · 147 pts
SeverityFileLineSnippet
MEDIUMgallery/others/plot_optical_flow.py51# --------------------------------
MEDIUMgallery/others/plot_optical_flow.py112# ----------------------------------
MEDIUMgallery/others/plot_optical_flow.py152# ---------------------------
MEDIUMgallery/others/plot_optical_flow.py174# ---------------------------------------
MEDIUMgallery/others/plot_visualization_utils.py39# ----------------------------
MEDIUMgallery/others/plot_visualization_utils.py57# --------------------------
MEDIUMgallery/others/plot_visualization_utils.py105# ------------------------------
MEDIUMgallery/others/plot_visualization_utils.py357# ------------------------------
MEDIUMgallery/others/plot_repurposing_annotations.py62# -----------------------------------------------
MEDIUMgallery/others/plot_repurposing_annotations.py162# ----------------------------------------------------
MEDIUMgallery/transforms/plot_cutmix_mixup.py32# -----------------------
MEDIUMgallery/transforms/plot_cutmix_mixup.py69# -----------------------------
MEDIUMgallery/transforms/plot_cutmix_mixup.py125# -------------------------
MEDIUMgallery/transforms/plot_transforms_getting_started.py36# ----------
MEDIUMgallery/transforms/plot_transforms_getting_started.py49# --------------------------------------
MEDIUMgallery/transforms/plot_transforms_getting_started.py83# -------------------------------
MEDIUMgallery/transforms/plot_transforms_getting_started.py128# --------------------
MEDIUMgallery/transforms/plot_transforms_getting_started.py156# ------------------------
MEDIUMgallery/transforms/plot_transforms_getting_started.py225# ------------------------------------------
MEDIUMgallery/transforms/plot_custom_transforms.py24# ===============================================================
MEDIUMgallery/transforms/plot_custom_transforms.py84# =====================================
MEDIUMgallery/transforms/plot_custom_transforms.py113# -----------------------------------------
MEDIUMgallery/transforms/plot_custom_transforms.py151# --------------------------------------
MEDIUMgallery/transforms/plot_keypoints_transforms.py43# -------------------------------
MEDIUMgallery/transforms/plot_keypoints_transforms.py75# ------------------------
MEDIUMgallery/transforms/plot_transforms_illustrations.py37# --------------------
MEDIUMgallery/transforms/plot_transforms_illustrations.py141# ----------------------
MEDIUMgallery/transforms/plot_transforms_illustrations.py253# -----------------------
MEDIUMgallery/transforms/plot_transforms_illustrations.py299# ---------------------------
MEDIUMgallery/transforms/plot_rotated_box_transforms.py41# -------------------------------
MEDIUMgallery/transforms/plot_rotated_box_transforms.py64# ------------------------
MEDIUMgallery/transforms/plot_rotated_box_transforms.py97# -------------------------------------------
MEDIUMgallery/transforms/plot_rotated_box_transforms.py169# --------------------------
MEDIUMgallery/transforms/plot_tv_tensors.py35# -------------------
MEDIUMgallery/transforms/plot_tv_tensors.py58# ------------------------------
MEDIUMgallery/transforms/plot_tv_tensors.py69# ------------------------------
MEDIUMgallery/transforms/plot_tv_tensors.py137# -----------------------------------------------
MEDIUMgallery/transforms/plot_transforms_e2e.py43# -------------------
MEDIUMgallery/transforms/plot_transforms_e2e.py93# ----------
MEDIUMgallery/transforms/plot_transforms_e2e.py142# ------------------------------
MEDIUMgallery/transforms/plot_transforms_e2e.py172# -------------------
MEDIUMgallery/transforms/plot_custom_tv_tensors.py93# -----------------------------------------------------------------------
MEDIUMgallery/transforms/plot_custom_tv_tensors.py125# ------------------------------
MEDIUMtorchvision/_autograd_registrations.py8# =====================================================================
MEDIUMtorchvision/_autograd_registrations.py10# =====================================================================
MEDIUMtorchvision/_autograd_registrations.py208# =====================================================================
MEDIUMtorchvision/_autograd_registrations.py210# =====================================================================
MEDIUMtorchvision/_autograd_registrations.py328# =====================================================================
MEDIUMtorchvision/_autograd_registrations.py330# =====================================================================
Over-Commented Block107 hits · 106 pts
SeverityFileLineSnippet
LOWpackaging/cut_release.sh1#!/usr/bin/env bash
LOWtest/smoke_test.py41 # if torch.cuda.is_available():
LOWtest/conftest.py21 config.addinivalue_line("markers", "dont_collect: mark for tests that should not be collected")
LOWtest/conftest.py81
LOWtest/test_models.py841 # We first try to assert the entire output if possible. This is not
LOWtest/test_transforms_v2.py7161 dtype=torch.float32,
LOWreferences/depth/stereo/transforms.py481 )
LOWgallery/others/plot_optical_flow.py121# If you can, run this example on a GPU, it will be a lot faster.
LOWgallery/others/plot_optical_flow.py141# vertical displacement of each pixel from the first image to the second image.
LOWgallery/others/plot_optical_flow.py181
LOWgallery/others/plot_visualization_utils.py101show(dogs_with_boxes)
LOWgallery/others/plot_visualization_utils.py161# 1]``. To get boolean masks, we can do the following:
LOWgallery/others/plot_visualization_utils.py241# Instance segmentation models
LOWgallery/others/plot_visualization_utils.py281# associated to those keys has ``num_instances`` elements in it. In our case
LOWgallery/others/plot_visualization_utils.py341
LOWgallery/others/plot_visualization_utils.py381# As we see the output contains a list of dictionaries.
LOWgallery/others/plot_visualization_utils.py421# As we see, the keypoints appear as colored circles over the image.
LOWgallery/others/plot_visualization_utils.py441#
LOWgallery/others/plot_visualization_utils.py501# So we definitely don't want to display those keypoints and connections, and you don't have to.
LOWgallery/others/plot_visualization_utils.py521# The :func:`~torchvision.models.detection.keypointrcnn_resnet50_fpn` model,
LOWgallery/others/plot_scripted_tensor_transforms.py61# <v1_or_v2>` way to use transforms in your code.
LOWgallery/others/plot_repurposing_annotations.py41
LOWgallery/others/plot_repurposing_annotations.py161# Converting Segmentation Dataset to Detection Dataset
LOWgallery/transforms/plot_cutmix_mixup.py61 print(f"{images.shape = }, {labels.shape = }")
LOWgallery/transforms/plot_cutmix_mixup.py81mixup = v2.MixUp(num_classes=NUM_CLASSES)
LOWgallery/transforms/plot_cutmix_mixup.py121 break
LOWgallery/transforms/plot_transforms_getting_started.py61
LOWgallery/transforms/plot_transforms_getting_started.py121# answer these in the next sections.
LOWgallery/transforms/plot_transforms_getting_started.py141img_dp = tv_tensors.Image(torch.randint(0, 256, (3, 256, 256), dtype=torch.uint8))
LOWgallery/transforms/plot_transforms_getting_started.py181# %%
LOWgallery/transforms/plot_transforms_getting_started.py201# :class:`~torchvision.tv_tensors.Image` class at all, and yet our images
LOWgallery/transforms/plot_transforms_getting_started.py221#
LOWgallery/transforms/plot_transforms_getting_started.py241# TVTensors, so they don't return TVTensors out of the box.
LOWgallery/transforms/plot_transforms_getting_started.py261#
LOWgallery/transforms/plot_custom_transforms.py21
LOWgallery/transforms/plot_custom_transforms.py81# :ref:`tv_tensor_unwrapping_behaviour`
LOWgallery/transforms/plot_custom_transforms.py141# ``structured_input``, the input is flattened and then each individual part is
LOWgallery/transforms/plot_custom_transforms.py181_ = my_random_transform(structured_input) # doesn't transform
LOWgallery/transforms/plot_transforms_illustrations.py41#
LOWgallery/transforms/plot_transforms_illustrations.py61# ~~~~~~~~~~
LOWgallery/transforms/plot_transforms_illustrations.py81# (see also :func:`~torchvision.transforms.functional.perspective`)
LOWgallery/transforms/plot_transforms_illustrations.py101# (see also :func:`~torchvision.transforms.functional.affine`)
LOWgallery/transforms/plot_transforms_illustrations.py121# The :class:`~torchvision.transforms.RandomCrop` transform
LOWgallery/transforms/plot_transforms_illustrations.py141# ----------------------
LOWgallery/transforms/plot_transforms_illustrations.py161# ~~~~~~~~~~~
LOWgallery/transforms/plot_transforms_illustrations.py181# The :class:`~torchvision.transforms.RandomInvert` transform
LOWgallery/transforms/plot_transforms_illustrations.py201# ~~~~~~~~~~~~~~
LOWgallery/transforms/plot_transforms_illustrations.py221# RandomAutocontrast
LOWgallery/transforms/plot_transforms_illustrations.py241# JPEG
LOWgallery/transforms/plot_transforms_illustrations.py281# ~~~~~~~~~~~~~~~~~~
LOWgallery/transforms/plot_transforms_illustrations.py301# The following transforms are randomly-applied given a probability ``p``. That is, given ``p = 0.5``,
LOWgallery/transforms/plot_rotated_box_transforms.py81resized_imgs = [
LOWgallery/transforms/plot_rotated_box_transforms.py101# transformed (cropped) image. In general, this may happen on most of the
LOWgallery/transforms/plot_rotated_box_transforms.py161print(soft_center_crops_and_boxes)
LOWgallery/transforms/plot_tv_tensors.py41
LOWgallery/transforms/plot_tv_tensors.py61# Everything that is supported on a plain :class:`torch.Tensor` like ``.sum()`` or
LOWgallery/transforms/plot_tv_tensors.py81# Similar to other PyTorch creations ops, the constructor also takes the ``dtype``, ``device``, and ``requires_grad``
LOWgallery/transforms/plot_tv_tensors.py121# into a TVTensor. This is useful when you already have an object of the
LOWgallery/transforms/plot_tv_tensors.py181# Why is this happening?
LOWgallery/transforms/plot_tv_tensors.py201# desirable.
47 more matches not shown…
Deep Nesting105 hits · 100 pts
SeverityFileLineSnippet
LOWsetup.py372
LOWpackaging/wheel/relocate.py282
LOWtest/builtin_dataset_mocks.py484
LOWtest/builtin_dataset_mocks.py41
LOWtest/conftest.py25
LOWtest/test_datasets.py292
LOWtest/test_datasets.py1002
LOWtest/test_datasets.py1763
LOWtest/test_datasets.py2530
LOWtest/test_datasets_download.py80
LOWtest/test_extended_models.py244
LOWtest/test_transforms_v2.py7194
LOWtest/test_transforms_v2.py1789
LOWtest/test_transforms_v2.py4238
LOWtest/test_ops.py290
LOWtest/test_ops.py340
LOWtest/test_ops.py427
LOWtest/test_ops.py661
LOWtest/test_ops.py962
LOWtest/common_utils.py410
LOWtest/common_utils.py54
LOWtest/datasets_utils.py971
LOWtest/datasets_utils.py483
LOWtest/datasets_utils.py576
LOWtest/datasets_utils.py709
LOWreferences/classification/presets.py21
LOWreferences/depth/stereo/transforms.py519
LOWreferences/depth/stereo/train.py36
LOWreferences/depth/stereo/train.py267
LOWreferences/depth/stereo/cascade_evaluation.py109
LOWreferences/optical_flow/train.py13
LOWreferences/optical_flow/train.py133
LOWreferences/detection/presets.py21
LOWgallery/transforms/helpers.py9
LOWtorchvision/utils.py25
LOWtorchvision/utils.py177
LOWtorchvision/utils.py285
LOWtorchvision/utils.py418
LOWtorchvision/utils.py487
LOWtorchvision/utils.py722
LOWtorchvision/datasets/flickr.py40
LOWtorchvision/datasets/folder.py49
LOWtorchvision/datasets/lfw.py137
LOWtorchvision/datasets/celeba.py175
LOWtorchvision/datasets/_stereo_matching.py579
LOWtorchvision/datasets/widerface.py113
LOWtorchvision/datasets/_optical_flow.py349
LOWtorchvision/datasets/inaturalist.py142
LOWtorchvision/datasets/inaturalist.py209
LOWtorchvision/models/googlenet.py32
LOWtorchvision/models/mnasnet.py112
LOWtorchvision/models/vgg.py36
LOWtorchvision/models/regnet.py297
LOWtorchvision/models/vision_transformer.py789
LOWtorchvision/models/vision_transformer.py54
LOWtorchvision/models/densenet.py152
LOWtorchvision/models/inception.py29
LOWtorchvision/models/feature_extraction.py369
LOWtorchvision/models/efficientnet.py366
LOWtorchvision/models/efficientnet.py234
45 more matches not shown…
Docstring Block Structure12 hits · 60 pts
SeverityFileLineSnippet
HIGHtest/datasets_utils.py881Create a video file from random data. Args: root (Union[str, pathlib.Path]): Root directory the video file
HIGHtest/datasets_utils.py929Create a folder of random videos. Args: root (Union[str, pathlib.Path]): Root directory the video folder wi
HIGHreferences/classification/utils.py324 This method can be used to prepare weights files for new models. It receives as input a model architecture and
HIGHtorchvision/utils.py728 Parses a specification of colors for a set of objects. Args: colors: A specification of colors for the
HIGHtorchvision/datasets/places365.py13`Places365 <http://places2.csail.mit.edu/index.html>`_ classification dataset. Args: root (str or ``pathlib
HIGHtorchvision/datasets/folder.py174Generates a list of samples of a form (path_to_sample, class). This can be overridden to e.g. read files from a
HIGHtorchvision/datasets/folder.py208Find the class folders in a dataset structured as follows:: directory/ ├── class_x
HIGHtorchvision/datasets/utils.py248Detect the archive type and/or compression of a file. Args: file (str): the filename Returns:
HIGHtorchvision/datasets/kinetics.py23`Generic Kinetics <https://www.deepmind.com/open-source/kinetics>`_ dataset. Kinetics-400/600/700 are action re
HIGHtorchvision/models/feature_extraction.py210 Dev utility to return node names in order of execution. See note on node names under :func:`create_feature_extr
HIGHtorchvision/transforms/functional.py217Convert a tensor image to the given ``dtype`` and scale the values accordingly This function does not support PIL Im
HIGHtorchvision/ops/deform_conv.py24 Performs Deformable Convolution v2, described in `Deformable ConvNets v2: More Deformable, Better Results <
Excessive Try-Catch Wrapping18 hits · 24 pts
SeverityFileLineSnippet
LOWsetup.py62 except Exception:
LOWtest/test_extended_models.py398 except Exception:
LOWtest/test_prototype_datasets_builtin.py98 except Exception as error:
MEDIUMtest/test_prototype_datasets_builtin.py74def test_info(self, name):
LOWtest/test_prototype_models.py81 except Exception as e:
LOWtest/test_models.py992 except Exception as e:
MEDIUMtest/test_transforms_v2.py105def _script(obj):
LOWtest/test_transforms_v2.py108 except Exception as error:
LOWtest/common_utils.py249 except Exception as exc:
LOWtorchvision/utils.py192 except Exception:
LOWtorchvision/datasets/video_utils.py327 except Exception:
LOWtorchvision/prototype/datasets/benchmark.py658 except Exception as error:
LOW…chvision/prototype/datasets/generate_category_files.py58 except Exception as error:
LOWtorchvision/prototype/datasets/utils/_resource.py194 except Exception:
LOWrelease/apply-release-changes.py46 except Exception as e:
MEDIUMrelease/apply-release-changes.py47 print(f"Error processing {file_path}: {e}")
MEDIUMrelease/apply-release-changes.py71 print("Error: Exactly one version parameter is required")
MEDIUMrelease/apply-release-changes.py83 print("Error: Not inside a git repository. Please run from within a git repository.")
AI Slop Vocabulary10 hits · 22 pts
SeverityFileLineSnippet
MEDIUMtest/conftest.py63 # TODO: something more robust would be to do that only in a sandcastle instance,
MEDIUMtest/test_models.py253# This may be caused by the harness environment (e.g. num classes, input initialization
LOWtest/test_transforms_v2.py155 # Most kernels just return a tensor, but some also return some additional metadata
LOWtest/test_transforms_v2.py174 # Most kernels just return a tensor, but some also return some additional metadata
LOWreferences/detection/transforms.py464 # Let's just return (image, target)
MEDIUMgallery/transforms/plot_transforms_e2e.py99# dataset so that they can leverage multi-processing from the
MEDIUMtorchvision/datasets/caltech.py126 # can be more robust and check hash of files
MEDIUMtorchvision/datasets/caltech.py226 # can be more robust and check hash of files
LOWtorchvision/prototype/transforms/_augment.py183 # Let's just return (image, target)
LOWtorchvision/transforms/v2/_transform.py155 # are JIT scriptable, and we made sure that for single image inputs v1 and v2 are equivalent, we just return the
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMgallery/transforms/plot_rotated_box_transforms.py40# Creating a Rotated Bounding Box
MEDIUMtorchvision/transforms/v2/_transform.py129 # This method is called after subclassing has happened, i.e. `cls` is the subclass, e.g. `Resize`.
MEDIUMtorchvision/transforms/v2/_transform.py134 # This method is called by `__prepare_scriptable__` to instantiate the equivalent v1 transform from the current
MEDIUMtorchvision/transforms/v2/_transform.py153 # This method is called early on when `torch.jit.script`'ing an `nn.Module` instance. If it succeeds, the return
MEDIUMtorchvision/transforms/v2/functional/_color.py263 # Create a view on the underlying output while pointing at the same data. We do this to avoid indexing twice.
MEDIUMdocs/source/conf.py6# This file is execfile()d with the current directory set to its
Verbosity Indicators9 hits · 16 pts
SeverityFileLineSnippet
LOWtest/smoke_test.py93 # Step 1: Initialize model with the best available weights
LOWtest/smoke_test.py98 # Step 2: Initialize the inference transforms
LOWtest/smoke_test.py101 # Step 3: Apply inference preprocessing transforms
LOWtest/smoke_test.py104 # Step 4: Use the model and print the predicted category
LOWtorchvision/csrc/ops/box_iou_rotated_utils.h182 // Step 1:
LOWtorchvision/csrc/ops/box_iou_rotated_utils.h194 // Step 2:
LOWtorchvision/csrc/ops/box_iou_rotated_utils.h205 // Step 3:
LOWtorchvision/csrc/ops/box_iou_rotated_utils.h262 // Step 4:
LOWtorchvision/csrc/ops/box_iou_rotated_utils.h279 // Step 5:
Redundant / Tautological Comments9 hits · 15 pts
SeverityFileLineSnippet
LOWpackaging/pre_build_script_arm64.sh25# Set vcpkg to only build release packages
LOWtest/test_utils.py132 # Check if modification is not in place
LOWtest/test_utils.py257 # Check if modification is not in place
LOWtest/test_transforms.py1743 # Check if content in center of both image and cropped output is same.
LOWreferences/similarity/loss.py102 # Check if labels[i] == labels[j]
LOWtorchvision/models/detection/roi_heads.py423 # Set shape to [batchxCxHxW]
LOWtorchvision/models/detection/roi_heads.py449 # Set shape to [batchxCxHxW]
LOWrelease/apply-release-changes.py56 # Check if .git directory exists
LOWrelease/apply-release-changes.py69 # Check if version is provided as command line argument
Slop Phrases5 hits · 8 pts
SeverityFileLineSnippet
LOWreferences/depth/stereo/train.py527 # make sure to disable shuffling since the dataset is already shuffled
LOWgallery/transforms/plot_custom_transforms.py79# While working with TVTensor classes in your code, make sure to
MEDIUMgallery/transforms/plot_tv_tensors.py172# Alternatively, you can use the :func:`~torchvision.tv_tensors.set_return_type`
LOWtorchvision/transforms/v2/_augment.py191 # after an image or video. However, we need to handle them in _transform, so we make sure to set them to True
MEDIUMscripts/release_notes/retrieve_prs_data.py207 # Then you can use classify_prs.py (as a notebook)