Datasets, Transforms and Models specific to Computer Vision
1710 matches across 13 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | references/classification/utils.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/depth/stereo/utils/logger.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/segmentation/utils.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/video_classification/utils.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/optical_flow/utils.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/detection/utils.py | 0 | track a series of values and provide access to smoothed values over a window or the global series average. |
| HIGH | references/classification/utils.py | 0 | this function disables printing when not in master process |
| HIGH | references/segmentation/utils.py | 0 | this function disables printing when not in master process |
| HIGH | references/video_classification/utils.py | 0 | this function disables printing when not in master process |
| HIGH | references/detection/utils.py | 0 | this function disables printing when not in master process |
| HIGH | references/depth/stereo/utils/losses.py | 0 | loss function defined over sequence of flow predictions |
| HIGH | references/depth/stereo/utils/losses.py | 0 | loss function defined over sequence of flow predictions |
| HIGH | references/optical_flow/utils.py | 0 | loss function defined over sequence of flow predictions |
| HIGH | torchvision/datasets/stl10.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/usps.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/svhn.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/semeion.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/cifar.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/caltech.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/mnist.py | 0 | args: index (int): index returns: tuple: (image, target) where target is index of the target class. |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 3-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``( |
| HIGH | torchvision/datasets/_stereo_matching.py | 0 | return example at given index. args: index(int): the index of the example to retrieve returns: tuple: a 4-tuple with ``( |
| HIGH | torchvision/models/shufflenetv2.py | 0 | these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra |
| HIGH | torchvision/models/shufflenetv2.py | 0 | these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra |
| HIGH | torchvision/models/mnasnet.py | 0 | these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra |
| HIGH | torchvision/models/mnasnet.py | 0 | these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra |
| HIGH | torchvision/models/resnet.py | 0 | these weights were trained from scratch by using torchvision's `new training recipe <https://pytorch.org/blog/how-to-tra |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/squeezenet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/resnet.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/mobilenetv2.py | 0 | these weights reproduce closely the results of the paper using a simple training recipe. |
| HIGH | torchvision/models/regnet.py | 0 | these weights improve upon the results of the original paper by using a modified version of torchvision's `new training |
| HIGH | torchvision/models/regnet.py | 0 | these weights improve upon the results of the original paper by using a modified version of torchvision's `new training |
| HIGH | torchvision/models/regnet.py | 0 | these weights improve upon the results of the original paper by using a modified version of torchvision's `new training |
| 66 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | test/smoke_test.py | 24 | def smoke_test_torchvision_read_decode() -> None: |
| LOW | test/smoke_test.py | 69 | def smoke_test_torchvision_decode_jpeg(device: str = "cpu"): |
| LOW | test/builtin_dataset_mocks.py | 122 | def parametrize_dataset_mocks(*dataset_mocks, marks=None): |
| LOW | test/builtin_dataset_mocks.py | 803 | def _make_detection_anns_folder(cls, root, name, *, file_name_fn, num_examples): |
| LOW | test/builtin_dataset_mocks.py | 928 | def _make_bounding_boxes_file(cls, root, image_file_names): |
| LOW | test/builtin_dataset_mocks.py | 1230 | def _meta_to_split_and_classification_ann(cls, meta, idx): |
| LOW | test/test_utils.py | 42 | def test_make_grid_not_inplace(): |
| LOW | test/test_utils.py | 56 | def test_normalize_in_make_grid(): |
| LOW | test/test_utils.py | 83 | def test_save_image_single_pixel(): |
| LOW | test/test_utils.py | 91 | def test_save_image_file_object(): |
| LOW | test/test_utils.py | 103 | def test_save_image_single_pixel_file_object(): |
| LOW | test/test_utils.py | 138 | def test_draw_boxes_with_coloured_labels(): |
| LOW | test/test_utils.py | 153 | def test_draw_boxes_with_coloured_label_backgrounds(): |
| LOW | test/test_utils.py | 170 | def test_draw_boxes_with_coloured_label_text_boxes(): |
| LOW | test/test_utils.py | 208 | def test_draw_rotated_boxes_fill(): |
| LOW | test/test_utils.py | 262 | def test_draw_boxes_grayscale(): |
| LOW | test/test_utils.py | 321 | def test_draw_segmentation_masks(colors, alpha, device): |
| LOW | test/test_utils.py | 363 | def test_draw_segmentation_masks_dtypes(): |
| LOW | test/test_utils.py | 384 | def test_draw_segmentation_masks_errors(device): |
| LOW | test/test_utils.py | 421 | def test_draw_no_segmention_mask(device): |
| LOW | test/test_utils.py | 430 | def test_draw_keypoints_vanilla(): |
| LOW | test/test_utils.py | 465 | def test_draw_keypoints_colored(colors): |
| LOW | test/test_utils.py | 492 | def test_draw_keypoints_visibility(connectivity, vis): |
| LOW | test/test_utils.py | 531 | def test_draw_keypoints_visibility_default(): |
| LOW | test/test_utils.py | 555 | def test_draw_keypoints_dtypes(): |
| LOW | test/test_utils.py | 571 | def test_draw_keypoints_errors(): |
| LOW | test/test_utils.py | 636 | def test_flow_to_image_errors(input_flow, match): |
| LOW | test/conftest.py | 25 | def pytest_collection_modifyitems(items): |
| LOW | test/test_transforms_video.py | 40 | def test_random_resized_crop_video(self): |
| LOW | test/test_transforms_video.py | 116 | def samples_from_standard_normal(tensor): |
| LOW | test/test_transforms_video.py | 164 | def test_random_horizontal_flip_video(self, p): |
| LOW | test/test_prototype_datasets_utils.py | 129 | def test_priority_decompressed_gt_raw(self, tmp_path): |
| LOW | test/test_prototype_datasets_utils.py | 142 | def test_priority_extracted_gt_decompressed(self, tmp_path): |
| LOW | test/test_prototype_datasets_utils.py | 177 | def test_preprocess_decompress(self, tmp_path, preprocess): |
| LOW | test/test_prototype_datasets_utils.py | 218 | def test_preprocess_only_after_download(self, tmp_path): |
| LOW | test/test_prototype_datasets_utils.py | 287 | def test_missing_dependency_error(): |
| LOW | test/test_datasets_utils.py | 49 | def test_get_redirect_url_max_hops_exceeded(self, mocker): |
| LOW | test/test_datasets_utils.py | 81 | def test_get_google_drive_file_id(self): |
| LOW | test/test_datasets_utils.py | 88 | def test_get_google_drive_file_id_invalid_url(self): |
| LOW | test/test_datasets_utils.py | 116 | def test_detect_file_type_incompatible(self, file): |
| LOW | test/test_datasets_utils.py | 145 | def test_decompress_no_compression(self): |
| LOW | test/test_datasets_utils.py | 150 | def test_decompress_remove_finished(self, tmpdir, use_pathlib): |
| LOW | test/test_datasets_utils.py | 178 | def test_extract_archive_defer_to_decompress(self, extension, remove_finished, mocker): |
| LOW | test/test_datasets_utils.py | 270 | def test_make_dataset_no_valid_files(tmpdir, kwargs, expected_error_msg): |
| LOW | test/test_datasets.py | 149 | def _create_annotation_folder(self, root, name, file_name_fn, num_examples): |
| LOW | test/test_datasets.py | 385 | def test_feature_types_target_color(self): |
| LOW | test/test_datasets.py | 391 | def test_feature_types_target_polygon(self): |
| LOW | test/test_datasets.py | 1053 | def test_not_found_or_corrupted(self): |
| LOW | test/test_datasets.py | 1330 | def test_not_found_or_corrupted(self): |
| LOW | test/test_datasets.py | 1700 | def _is_valid_file_to_extensions(self, is_valid_file): |
| LOW | test/test_datasets.py | 1992 | def test_tv_decode_image_support(self): |
| LOW | test/test_datasets.py | 2727 | def _meta_to_split_and_classification_ann(self, meta, idx): |
| LOW | test/test_datasets.py | 3403 | def _create_annotation_folder(num_examples: int, root_dir: str): |
| LOW | test/test_datasets.py | 3511 | def test_augmented_view_usage(self): |
| LOW | test/test_datasets_video_utils.py | 72 | def test_video_clips_custom_fps(self, tmpdir): |
| LOW | test/test_datasets_video_utils.py | 83 | def test_compute_clips_for_video(self): |
| LOW | test/test_backbone_utils.py | 98 | def _create_feature_extractor(self, *args, **kwargs): |
| LOW | test/test_backbone_utils.py | 131 | def test_build_fx_feature_extractor(self, model_name): |
| LOW | test/test_backbone_utils.py | 162 | def test_node_name_conventions(self): |
| LOW | test/test_backbone_utils.py | 186 | def test_feature_extraction_methods_equivalence(self): |
| 540 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | hubconf.py | 4 | |
| LOW | hubconf.py | 4 | |
| LOW | hubconf.py | 5 | |
| LOW | hubconf.py | 6 | |
| LOW | hubconf.py | 6 | |
| LOW | hubconf.py | 6 | |
| LOW | hubconf.py | 6 | |
| LOW | hubconf.py | 7 | |
| LOW | hubconf.py | 7 | |
| LOW | hubconf.py | 7 | |
| LOW | hubconf.py | 7 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 8 | |
| LOW | hubconf.py | 21 | |
| LOW | hubconf.py | 22 | |
| LOW | hubconf.py | 23 | |
| LOW | hubconf.py | 24 | |
| LOW | hubconf.py | 24 | |
| LOW | hubconf.py | 24 | |
| LOW | hubconf.py | 24 | |
| LOW | hubconf.py | 25 | |
| LOW | hubconf.py | 26 | |
| LOW | hubconf.py | 26 | |
| LOW | hubconf.py | 27 | |
| LOW | hubconf.py | 27 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 28 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 45 | |
| LOW | hubconf.py | 57 | |
| 594 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | gallery/others/plot_optical_flow.py | 51 | # -------------------------------- |
| MEDIUM | gallery/others/plot_optical_flow.py | 112 | # ---------------------------------- |
| MEDIUM | gallery/others/plot_optical_flow.py | 152 | # --------------------------- |
| MEDIUM | gallery/others/plot_optical_flow.py | 174 | # --------------------------------------- |
| MEDIUM | gallery/others/plot_visualization_utils.py | 39 | # ---------------------------- |
| MEDIUM | gallery/others/plot_visualization_utils.py | 57 | # -------------------------- |
| MEDIUM | gallery/others/plot_visualization_utils.py | 105 | # ------------------------------ |
| MEDIUM | gallery/others/plot_visualization_utils.py | 357 | # ------------------------------ |
| MEDIUM | gallery/others/plot_repurposing_annotations.py | 62 | # ----------------------------------------------- |
| MEDIUM | gallery/others/plot_repurposing_annotations.py | 162 | # ---------------------------------------------------- |
| MEDIUM | gallery/transforms/plot_cutmix_mixup.py | 32 | # ----------------------- |
| MEDIUM | gallery/transforms/plot_cutmix_mixup.py | 69 | # ----------------------------- |
| MEDIUM | gallery/transforms/plot_cutmix_mixup.py | 125 | # ------------------------- |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 36 | # ---------- |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 49 | # -------------------------------------- |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 83 | # ------------------------------- |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 128 | # -------------------- |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 156 | # ------------------------ |
| MEDIUM | gallery/transforms/plot_transforms_getting_started.py | 225 | # ------------------------------------------ |
| MEDIUM | gallery/transforms/plot_custom_transforms.py | 24 | # =============================================================== |
| MEDIUM | gallery/transforms/plot_custom_transforms.py | 84 | # ===================================== |
| MEDIUM | gallery/transforms/plot_custom_transforms.py | 113 | # ----------------------------------------- |
| MEDIUM | gallery/transforms/plot_custom_transforms.py | 151 | # -------------------------------------- |
| MEDIUM | gallery/transforms/plot_keypoints_transforms.py | 43 | # ------------------------------- |
| MEDIUM | gallery/transforms/plot_keypoints_transforms.py | 75 | # ------------------------ |
| MEDIUM | gallery/transforms/plot_transforms_illustrations.py | 37 | # -------------------- |
| MEDIUM | gallery/transforms/plot_transforms_illustrations.py | 141 | # ---------------------- |
| MEDIUM | gallery/transforms/plot_transforms_illustrations.py | 253 | # ----------------------- |
| MEDIUM | gallery/transforms/plot_transforms_illustrations.py | 299 | # --------------------------- |
| MEDIUM | gallery/transforms/plot_rotated_box_transforms.py | 41 | # ------------------------------- |
| MEDIUM | gallery/transforms/plot_rotated_box_transforms.py | 64 | # ------------------------ |
| MEDIUM | gallery/transforms/plot_rotated_box_transforms.py | 97 | # ------------------------------------------- |
| MEDIUM | gallery/transforms/plot_rotated_box_transforms.py | 169 | # -------------------------- |
| MEDIUM | gallery/transforms/plot_tv_tensors.py | 35 | # ------------------- |
| MEDIUM | gallery/transforms/plot_tv_tensors.py | 58 | # ------------------------------ |
| MEDIUM | gallery/transforms/plot_tv_tensors.py | 69 | # ------------------------------ |
| MEDIUM | gallery/transforms/plot_tv_tensors.py | 137 | # ----------------------------------------------- |
| MEDIUM | gallery/transforms/plot_transforms_e2e.py | 43 | # ------------------- |
| MEDIUM | gallery/transforms/plot_transforms_e2e.py | 93 | # ---------- |
| MEDIUM | gallery/transforms/plot_transforms_e2e.py | 142 | # ------------------------------ |
| MEDIUM | gallery/transforms/plot_transforms_e2e.py | 172 | # ------------------- |
| MEDIUM | gallery/transforms/plot_custom_tv_tensors.py | 93 | # ----------------------------------------------------------------------- |
| MEDIUM | gallery/transforms/plot_custom_tv_tensors.py | 125 | # ------------------------------ |
| MEDIUM | torchvision/_autograd_registrations.py | 8 | # ===================================================================== |
| MEDIUM | torchvision/_autograd_registrations.py | 10 | # ===================================================================== |
| MEDIUM | torchvision/_autograd_registrations.py | 208 | # ===================================================================== |
| MEDIUM | torchvision/_autograd_registrations.py | 210 | # ===================================================================== |
| MEDIUM | torchvision/_autograd_registrations.py | 328 | # ===================================================================== |
| MEDIUM | torchvision/_autograd_registrations.py | 330 | # ===================================================================== |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packaging/cut_release.sh | 1 | #!/usr/bin/env bash |
| LOW | test/smoke_test.py | 41 | # if torch.cuda.is_available(): |
| LOW | test/conftest.py | 21 | config.addinivalue_line("markers", "dont_collect: mark for tests that should not be collected") |
| LOW | test/conftest.py | 81 | |
| LOW | test/test_models.py | 841 | # We first try to assert the entire output if possible. This is not |
| LOW | test/test_transforms_v2.py | 7161 | dtype=torch.float32, |
| LOW | references/depth/stereo/transforms.py | 481 | ) |
| LOW | gallery/others/plot_optical_flow.py | 121 | # If you can, run this example on a GPU, it will be a lot faster. |
| LOW | gallery/others/plot_optical_flow.py | 141 | # vertical displacement of each pixel from the first image to the second image. |
| LOW | gallery/others/plot_optical_flow.py | 181 | |
| LOW | gallery/others/plot_visualization_utils.py | 101 | show(dogs_with_boxes) |
| LOW | gallery/others/plot_visualization_utils.py | 161 | # 1]``. To get boolean masks, we can do the following: |
| LOW | gallery/others/plot_visualization_utils.py | 241 | # Instance segmentation models |
| LOW | gallery/others/plot_visualization_utils.py | 281 | # associated to those keys has ``num_instances`` elements in it. In our case |
| LOW | gallery/others/plot_visualization_utils.py | 341 | |
| LOW | gallery/others/plot_visualization_utils.py | 381 | # As we see the output contains a list of dictionaries. |
| LOW | gallery/others/plot_visualization_utils.py | 421 | # As we see, the keypoints appear as colored circles over the image. |
| LOW | gallery/others/plot_visualization_utils.py | 441 | # |
| LOW | gallery/others/plot_visualization_utils.py | 501 | # So we definitely don't want to display those keypoints and connections, and you don't have to. |
| LOW | gallery/others/plot_visualization_utils.py | 521 | # The :func:`~torchvision.models.detection.keypointrcnn_resnet50_fpn` model, |
| LOW | gallery/others/plot_scripted_tensor_transforms.py | 61 | # <v1_or_v2>` way to use transforms in your code. |
| LOW | gallery/others/plot_repurposing_annotations.py | 41 | |
| LOW | gallery/others/plot_repurposing_annotations.py | 161 | # Converting Segmentation Dataset to Detection Dataset |
| LOW | gallery/transforms/plot_cutmix_mixup.py | 61 | print(f"{images.shape = }, {labels.shape = }") |
| LOW | gallery/transforms/plot_cutmix_mixup.py | 81 | mixup = v2.MixUp(num_classes=NUM_CLASSES) |
| LOW | gallery/transforms/plot_cutmix_mixup.py | 121 | break |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 61 | |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 121 | # answer these in the next sections. |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 141 | img_dp = tv_tensors.Image(torch.randint(0, 256, (3, 256, 256), dtype=torch.uint8)) |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 181 | # %% |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 201 | # :class:`~torchvision.tv_tensors.Image` class at all, and yet our images |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 221 | # |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 241 | # TVTensors, so they don't return TVTensors out of the box. |
| LOW | gallery/transforms/plot_transforms_getting_started.py | 261 | # |
| LOW | gallery/transforms/plot_custom_transforms.py | 21 | |
| LOW | gallery/transforms/plot_custom_transforms.py | 81 | # :ref:`tv_tensor_unwrapping_behaviour` |
| LOW | gallery/transforms/plot_custom_transforms.py | 141 | # ``structured_input``, the input is flattened and then each individual part is |
| LOW | gallery/transforms/plot_custom_transforms.py | 181 | _ = my_random_transform(structured_input) # doesn't transform |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 41 | # |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 61 | # ~~~~~~~~~~ |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 81 | # (see also :func:`~torchvision.transforms.functional.perspective`) |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 101 | # (see also :func:`~torchvision.transforms.functional.affine`) |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 121 | # The :class:`~torchvision.transforms.RandomCrop` transform |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 141 | # ---------------------- |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 161 | # ~~~~~~~~~~~ |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 181 | # The :class:`~torchvision.transforms.RandomInvert` transform |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 201 | # ~~~~~~~~~~~~~~ |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 221 | # RandomAutocontrast |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 241 | # JPEG |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 281 | # ~~~~~~~~~~~~~~~~~~ |
| LOW | gallery/transforms/plot_transforms_illustrations.py | 301 | # The following transforms are randomly-applied given a probability ``p``. That is, given ``p = 0.5``, |
| LOW | gallery/transforms/plot_rotated_box_transforms.py | 81 | resized_imgs = [ |
| LOW | gallery/transforms/plot_rotated_box_transforms.py | 101 | # transformed (cropped) image. In general, this may happen on most of the |
| LOW | gallery/transforms/plot_rotated_box_transforms.py | 161 | print(soft_center_crops_and_boxes) |
| LOW | gallery/transforms/plot_tv_tensors.py | 41 | |
| LOW | gallery/transforms/plot_tv_tensors.py | 61 | # Everything that is supported on a plain :class:`torch.Tensor` like ``.sum()`` or |
| LOW | gallery/transforms/plot_tv_tensors.py | 81 | # Similar to other PyTorch creations ops, the constructor also takes the ``dtype``, ``device``, and ``requires_grad`` |
| LOW | gallery/transforms/plot_tv_tensors.py | 121 | # into a TVTensor. This is useful when you already have an object of the |
| LOW | gallery/transforms/plot_tv_tensors.py | 181 | # Why is this happening? |
| LOW | gallery/transforms/plot_tv_tensors.py | 201 | # desirable. |
| 47 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 372 | |
| LOW | packaging/wheel/relocate.py | 282 | |
| LOW | test/builtin_dataset_mocks.py | 484 | |
| LOW | test/builtin_dataset_mocks.py | 41 | |
| LOW | test/conftest.py | 25 | |
| LOW | test/test_datasets.py | 292 | |
| LOW | test/test_datasets.py | 1002 | |
| LOW | test/test_datasets.py | 1763 | |
| LOW | test/test_datasets.py | 2530 | |
| LOW | test/test_datasets_download.py | 80 | |
| LOW | test/test_extended_models.py | 244 | |
| LOW | test/test_transforms_v2.py | 7194 | |
| LOW | test/test_transforms_v2.py | 1789 | |
| LOW | test/test_transforms_v2.py | 4238 | |
| LOW | test/test_ops.py | 290 | |
| LOW | test/test_ops.py | 340 | |
| LOW | test/test_ops.py | 427 | |
| LOW | test/test_ops.py | 661 | |
| LOW | test/test_ops.py | 962 | |
| LOW | test/common_utils.py | 410 | |
| LOW | test/common_utils.py | 54 | |
| LOW | test/datasets_utils.py | 971 | |
| LOW | test/datasets_utils.py | 483 | |
| LOW | test/datasets_utils.py | 576 | |
| LOW | test/datasets_utils.py | 709 | |
| LOW | references/classification/presets.py | 21 | |
| LOW | references/depth/stereo/transforms.py | 519 | |
| LOW | references/depth/stereo/train.py | 36 | |
| LOW | references/depth/stereo/train.py | 267 | |
| LOW | references/depth/stereo/cascade_evaluation.py | 109 | |
| LOW | references/optical_flow/train.py | 13 | |
| LOW | references/optical_flow/train.py | 133 | |
| LOW | references/detection/presets.py | 21 | |
| LOW | gallery/transforms/helpers.py | 9 | |
| LOW | torchvision/utils.py | 25 | |
| LOW | torchvision/utils.py | 177 | |
| LOW | torchvision/utils.py | 285 | |
| LOW | torchvision/utils.py | 418 | |
| LOW | torchvision/utils.py | 487 | |
| LOW | torchvision/utils.py | 722 | |
| LOW | torchvision/datasets/flickr.py | 40 | |
| LOW | torchvision/datasets/folder.py | 49 | |
| LOW | torchvision/datasets/lfw.py | 137 | |
| LOW | torchvision/datasets/celeba.py | 175 | |
| LOW | torchvision/datasets/_stereo_matching.py | 579 | |
| LOW | torchvision/datasets/widerface.py | 113 | |
| LOW | torchvision/datasets/_optical_flow.py | 349 | |
| LOW | torchvision/datasets/inaturalist.py | 142 | |
| LOW | torchvision/datasets/inaturalist.py | 209 | |
| LOW | torchvision/models/googlenet.py | 32 | |
| LOW | torchvision/models/mnasnet.py | 112 | |
| LOW | torchvision/models/vgg.py | 36 | |
| LOW | torchvision/models/regnet.py | 297 | |
| LOW | torchvision/models/vision_transformer.py | 789 | |
| LOW | torchvision/models/vision_transformer.py | 54 | |
| LOW | torchvision/models/densenet.py | 152 | |
| LOW | torchvision/models/inception.py | 29 | |
| LOW | torchvision/models/feature_extraction.py | 369 | |
| LOW | torchvision/models/efficientnet.py | 366 | |
| LOW | torchvision/models/efficientnet.py | 234 | |
| 45 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | test/datasets_utils.py | 881 | Create a video file from random data. Args: root (Union[str, pathlib.Path]): Root directory the video file |
| HIGH | test/datasets_utils.py | 929 | Create a folder of random videos. Args: root (Union[str, pathlib.Path]): Root directory the video folder wi |
| HIGH | references/classification/utils.py | 324 | This method can be used to prepare weights files for new models. It receives as input a model architecture and |
| HIGH | torchvision/utils.py | 728 | Parses a specification of colors for a set of objects. Args: colors: A specification of colors for the |
| HIGH | torchvision/datasets/places365.py | 13 | `Places365 <http://places2.csail.mit.edu/index.html>`_ classification dataset. Args: root (str or ``pathlib |
| HIGH | torchvision/datasets/folder.py | 174 | Generates a list of samples of a form (path_to_sample, class). This can be overridden to e.g. read files from a |
| HIGH | torchvision/datasets/folder.py | 208 | Find the class folders in a dataset structured as follows:: directory/ ├── class_x |
| HIGH | torchvision/datasets/utils.py | 248 | Detect the archive type and/or compression of a file. Args: file (str): the filename Returns: |
| HIGH | torchvision/datasets/kinetics.py | 23 | `Generic Kinetics <https://www.deepmind.com/open-source/kinetics>`_ dataset. Kinetics-400/600/700 are action re |
| HIGH | torchvision/models/feature_extraction.py | 210 | Dev utility to return node names in order of execution. See note on node names under :func:`create_feature_extr |
| HIGH | torchvision/transforms/functional.py | 217 | Convert a tensor image to the given ``dtype`` and scale the values accordingly This function does not support PIL Im |
| HIGH | torchvision/ops/deform_conv.py | 24 | Performs Deformable Convolution v2, described in `Deformable ConvNets v2: More Deformable, Better Results < |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 62 | except Exception: |
| LOW | test/test_extended_models.py | 398 | except Exception: |
| LOW | test/test_prototype_datasets_builtin.py | 98 | except Exception as error: |
| MEDIUM | test/test_prototype_datasets_builtin.py | 74 | def test_info(self, name): |
| LOW | test/test_prototype_models.py | 81 | except Exception as e: |
| LOW | test/test_models.py | 992 | except Exception as e: |
| MEDIUM | test/test_transforms_v2.py | 105 | def _script(obj): |
| LOW | test/test_transforms_v2.py | 108 | except Exception as error: |
| LOW | test/common_utils.py | 249 | except Exception as exc: |
| LOW | torchvision/utils.py | 192 | except Exception: |
| LOW | torchvision/datasets/video_utils.py | 327 | except Exception: |
| LOW | torchvision/prototype/datasets/benchmark.py | 658 | except Exception as error: |
| LOW | …chvision/prototype/datasets/generate_category_files.py | 58 | except Exception as error: |
| LOW | torchvision/prototype/datasets/utils/_resource.py | 194 | except Exception: |
| LOW | release/apply-release-changes.py | 46 | except Exception as e: |
| MEDIUM | release/apply-release-changes.py | 47 | print(f"Error processing {file_path}: {e}") |
| MEDIUM | release/apply-release-changes.py | 71 | print("Error: Exactly one version parameter is required") |
| MEDIUM | release/apply-release-changes.py | 83 | print("Error: Not inside a git repository. Please run from within a git repository.") |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | test/conftest.py | 63 | # TODO: something more robust would be to do that only in a sandcastle instance, |
| MEDIUM | test/test_models.py | 253 | # This may be caused by the harness environment (e.g. num classes, input initialization |
| LOW | test/test_transforms_v2.py | 155 | # Most kernels just return a tensor, but some also return some additional metadata |
| LOW | test/test_transforms_v2.py | 174 | # Most kernels just return a tensor, but some also return some additional metadata |
| LOW | references/detection/transforms.py | 464 | # Let's just return (image, target) |
| MEDIUM | gallery/transforms/plot_transforms_e2e.py | 99 | # dataset so that they can leverage multi-processing from the |
| MEDIUM | torchvision/datasets/caltech.py | 126 | # can be more robust and check hash of files |
| MEDIUM | torchvision/datasets/caltech.py | 226 | # can be more robust and check hash of files |
| LOW | torchvision/prototype/transforms/_augment.py | 183 | # Let's just return (image, target) |
| LOW | torchvision/transforms/v2/_transform.py | 155 | # are JIT scriptable, and we made sure that for single image inputs v1 and v2 are equivalent, we just return the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | gallery/transforms/plot_rotated_box_transforms.py | 40 | # Creating a Rotated Bounding Box |
| MEDIUM | torchvision/transforms/v2/_transform.py | 129 | # This method is called after subclassing has happened, i.e. `cls` is the subclass, e.g. `Resize`. |
| MEDIUM | torchvision/transforms/v2/_transform.py | 134 | # This method is called by `__prepare_scriptable__` to instantiate the equivalent v1 transform from the current |
| MEDIUM | torchvision/transforms/v2/_transform.py | 153 | # This method is called early on when `torch.jit.script`'ing an `nn.Module` instance. If it succeeds, the return |
| MEDIUM | torchvision/transforms/v2/functional/_color.py | 263 | # Create a view on the underlying output while pointing at the same data. We do this to avoid indexing twice. |
| MEDIUM | docs/source/conf.py | 6 | # This file is execfile()d with the current directory set to its |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | test/smoke_test.py | 93 | # Step 1: Initialize model with the best available weights |
| LOW | test/smoke_test.py | 98 | # Step 2: Initialize the inference transforms |
| LOW | test/smoke_test.py | 101 | # Step 3: Apply inference preprocessing transforms |
| LOW | test/smoke_test.py | 104 | # Step 4: Use the model and print the predicted category |
| LOW | torchvision/csrc/ops/box_iou_rotated_utils.h | 182 | // Step 1: |
| LOW | torchvision/csrc/ops/box_iou_rotated_utils.h | 194 | // Step 2: |
| LOW | torchvision/csrc/ops/box_iou_rotated_utils.h | 205 | // Step 3: |
| LOW | torchvision/csrc/ops/box_iou_rotated_utils.h | 262 | // Step 4: |
| LOW | torchvision/csrc/ops/box_iou_rotated_utils.h | 279 | // Step 5: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | packaging/pre_build_script_arm64.sh | 25 | # Set vcpkg to only build release packages |
| LOW | test/test_utils.py | 132 | # Check if modification is not in place |
| LOW | test/test_utils.py | 257 | # Check if modification is not in place |
| LOW | test/test_transforms.py | 1743 | # Check if content in center of both image and cropped output is same. |
| LOW | references/similarity/loss.py | 102 | # Check if labels[i] == labels[j] |
| LOW | torchvision/models/detection/roi_heads.py | 423 | # Set shape to [batchxCxHxW] |
| LOW | torchvision/models/detection/roi_heads.py | 449 | # Set shape to [batchxCxHxW] |
| LOW | release/apply-release-changes.py | 56 | # Check if .git directory exists |
| LOW | release/apply-release-changes.py | 69 | # Check if version is provided as command line argument |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | references/depth/stereo/train.py | 527 | # make sure to disable shuffling since the dataset is already shuffled |
| LOW | gallery/transforms/plot_custom_transforms.py | 79 | # While working with TVTensor classes in your code, make sure to |
| MEDIUM | gallery/transforms/plot_tv_tensors.py | 172 | # Alternatively, you can use the :func:`~torchvision.tv_tensors.set_return_type` |
| LOW | torchvision/transforms/v2/_augment.py | 191 | # after an image or video. However, we need to handle them in _transform, so we make sure to set them to True |
| MEDIUM | scripts/release_notes/retrieve_prs_data.py | 207 | # Then you can use classify_prs.py (as a notebook) |