3 datasets found
  1. Z

    Data from: ImageNet-Patch: A Dataset for Benchmarking Machine Learning...

    • data.niaid.nih.gov
    Updated Jun 30, 2022
    + more versions
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Daniele Angioni (2022). ImageNet-Patch: A Dataset for Benchmarking Machine Learning Robustness against Adversarial Patches [Dataset]. https://data.niaid.nih.gov/resources?id=zenodo_6568777
    Explore at:
    Dataset updated
    Jun 30, 2022
    Dataset provided by
    Angelo Sotgiu
    Luca Demetrio
    Battista Biggio
    Maura Pintor
    Ambra Demontis
    Daniele Angioni
    Fabio Roli
    License

    Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
    License information was derived automatically

    Description

    Adversarial patches are optimized contiguous pixel blocks in an input image that cause a machine-learning model to misclassify it. However, their optimization is computationally demanding and requires careful hyperparameter tuning. To overcome these issues, we propose ImageNet-Patch, a dataset to benchmark machine-learning models against adversarial patches. It consists of a set of patches optimized to generalize across different models and applied to ImageNet data after preprocessing them with affine transformations. This process enables an approximate yet faster robustness evaluation, leveraging the transferability of adversarial perturbations.

    We release our dataset as a set of folders indicating the patch target label (e.g., banana), each containing 1000 subfolders as the ImageNet output classes.

    An example showing how to use the dataset is shown below.

    code for testing robustness of a model

    import os.path

    from torchvision import datasets, transforms, models import torch.utils.data

    class ImageFolderWithEmptyDirs(datasets.ImageFolder): """ This is required for handling empty folders from the ImageFolder Class. """

    def find_classes(self, directory):
      classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir())
      if not classes:
        raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
      class_to_idx = {cls_name: i for i, cls_name in enumerate(classes) if
              len(os.listdir(os.path.join(directory, cls_name))) > 0}
      return classes, class_to_idx
    

    extract and unzip the dataset, then write top folder here

    dataset_folder = 'data/ImageNet-Patch'

    available_labels = { 487: 'cellular telephone', 513: 'cornet', 546: 'electric guitar', 585: 'hair spray', 804: 'soap dispenser', 806: 'sock', 878: 'typewriter keyboard', 923: 'plate', 954: 'banana', 968: 'cup' }

    select folder with specific target

    target_label = 954

    dataset_folder = os.path.join(dataset_folder, str(target_label)) normalizer = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) transforms = transforms.Compose([ transforms.ToTensor(), normalizer ])

    dataset = ImageFolderWithEmptyDirs(dataset_folder, transform=transforms) model = models.resnet50(pretrained=True) loader = torch.utils.data.DataLoader(dataset, shuffle=True, batch_size=5) model.eval()

    batches = 10 correct, attack_success, total = 0, 0, 0 for batch_idx, (images, labels) in enumerate(loader): if batch_idx == batches: break pred = model(images).argmax(dim=1) correct += (pred == labels).sum() attack_success += sum(pred == target_label) total += pred.shape[0]

    accuracy = correct / total attack_sr = attack_success / total

    print("Robust Accuracy: ", accuracy) print("Attack Success: ", attack_sr)

  2. CIFAR-100 100x300 images extension

    • kaggle.com
    Updated Sep 11, 2020
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Tim von Känel (2020). CIFAR-100 100x300 images extension [Dataset]. https://www.kaggle.com/datasets/dunky11/cifar100-100x100-images-extension/suggestions
    Explore at:
    CroissantCroissant is a format for machine-learning datasets. Learn more about this at mlcommons.org/croissant.
    Dataset updated
    Sep 11, 2020
    Dataset provided by
    Kagglehttp://kaggle.com/
    Authors
    Tim von Känel
    Description

    Content This dataset adds 300 images for each of the 100 classes in the CIFAR-100 dataset. It was scraped using the Flickr API. Each folders name represents the class of it's containing images. All images are in JPEG. Has no known overlap with the CIFAR-100 dataset.

    Import Can be imported easily using PyTorchs torchvision.datasets.ImageFolder or Tensorflows tfds.ImageFolder.

  3. Ceilometer measurements dataset

    • zenodo.org
    zip
    Updated May 14, 2025
    Share
    FacebookFacebook
    TwitterTwitter
    Email
    Click to copy link
    Link copied
    Close
    Cite
    Alessio Barbaro Chisari; Alessio Barbaro Chisari; Luca Guarnera; Luca Guarnera; Alessandro Ortis; Alessandro Ortis; Wladimiro Carlo Patatu; Wladimiro Carlo Patatu; Sebastiano Battiato; Sebastiano Battiato; Mario Valerio Giuffrida; Mario Valerio Giuffrida (2025). Ceilometer measurements dataset [Dataset]. http://doi.org/10.5281/zenodo.10616434
    Explore at:
    zipAvailable download formats
    Dataset updated
    May 14, 2025
    Dataset provided by
    Zenodohttp://zenodo.org/
    Authors
    Alessio Barbaro Chisari; Alessio Barbaro Chisari; Luca Guarnera; Luca Guarnera; Alessandro Ortis; Alessandro Ortis; Wladimiro Carlo Patatu; Wladimiro Carlo Patatu; Sebastiano Battiato; Sebastiano Battiato; Mario Valerio Giuffrida; Mario Valerio Giuffrida
    License

    Attribution-NonCommercial-ShareAlike 2.0 (CC BY-NC-SA 2.0)https://creativecommons.org/licenses/by-nc-sa/2.0/
    License information was derived automatically

    Description

    This dataset contains images obtained by appropriate transformation of cloud detections from a ceilometer located in San Giovanni La Punta (Catania, Italy), from January 2023 to mid-March 2023. We used a Lufft CHM 15k ceilometer that leverages Light Detection and Ranging (LiDAR) technology. The ceilometer took measurements every 15 seconds quantifying the concentration of particles in the atmosphere. By taking advantage of the reflection, it is possible to determine the cloud layer coverage. Once raw data was collected, the variables of interest were scaled using a normalisation factor of the lidar-based ceilometer. All the variables are used to generate backscatter profiles. Specifically, we plot the time on the x-axis and the height of the measured particles (contained in the backscatter coefficient) on the y-axis. The colour of the plot depends on the intensity of the measured particle: intense blue means absence of particulate; red means intense presence of particulate. Numerically, the scale goes from the value 0 to the value of 5 · 10−6. We generated a backscatter profile for each day of measurements and each of these were further divided for every hour. In this way, we obtained 24 backscatter profiles for each day of observation.

    The file uploaded is a file with '. ZIP' extension. Once extracted, there are two folders: train and test. For each folder, there are two classes of images: true and false. We suggest using 'ImageFolder' to use the dataset (see reference: https://pytorch.org/vision/main/generated/torchvision.datasets.ImageFolder.html)

    For an example of using the dataset, please visit the following authors' repository: https://github.com/alessiochisari/CeilometerDatasetBenchmark

    The repository contains all the Jupyter Notebooks used by the authors to benchmark five state-of-the-art models on this new dataset.

    Please cite our work for any use of the dataset or code in this repository using this citation:

    @inproceedings{chisari2024, author = {Alessio Barbaro Chisari and others}, title = {On the Cloud Detection from Backscattered Images Generated From a Lidar-Based Ceilometer: Current State and Opportunities}, booktitle = {{IEEE} {ICIP} 2024, Abu Dhabi, UAE, October 27-30, 2024}, year = {2024} }

  4. Not seeing a result you expected?
    Learn how you can add new datasets to our index.

Share
FacebookFacebook
TwitterTwitter
Email
Click to copy link
Link copied
Close
Cite
Daniele Angioni (2022). ImageNet-Patch: A Dataset for Benchmarking Machine Learning Robustness against Adversarial Patches [Dataset]. https://data.niaid.nih.gov/resources?id=zenodo_6568777

Data from: ImageNet-Patch: A Dataset for Benchmarking Machine Learning Robustness against Adversarial Patches

Related Article
Explore at:
Dataset updated
Jun 30, 2022
Dataset provided by
Angelo Sotgiu
Luca Demetrio
Battista Biggio
Maura Pintor
Ambra Demontis
Daniele Angioni
Fabio Roli
License

Attribution 4.0 (CC BY 4.0)https://creativecommons.org/licenses/by/4.0/
License information was derived automatically

Description

Adversarial patches are optimized contiguous pixel blocks in an input image that cause a machine-learning model to misclassify it. However, their optimization is computationally demanding and requires careful hyperparameter tuning. To overcome these issues, we propose ImageNet-Patch, a dataset to benchmark machine-learning models against adversarial patches. It consists of a set of patches optimized to generalize across different models and applied to ImageNet data after preprocessing them with affine transformations. This process enables an approximate yet faster robustness evaluation, leveraging the transferability of adversarial perturbations.

We release our dataset as a set of folders indicating the patch target label (e.g., banana), each containing 1000 subfolders as the ImageNet output classes.

An example showing how to use the dataset is shown below.

code for testing robustness of a model

import os.path

from torchvision import datasets, transforms, models import torch.utils.data

class ImageFolderWithEmptyDirs(datasets.ImageFolder): """ This is required for handling empty folders from the ImageFolder Class. """

def find_classes(self, directory):
  classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir())
  if not classes:
    raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
  class_to_idx = {cls_name: i for i, cls_name in enumerate(classes) if
          len(os.listdir(os.path.join(directory, cls_name))) > 0}
  return classes, class_to_idx

extract and unzip the dataset, then write top folder here

dataset_folder = 'data/ImageNet-Patch'

available_labels = { 487: 'cellular telephone', 513: 'cornet', 546: 'electric guitar', 585: 'hair spray', 804: 'soap dispenser', 806: 'sock', 878: 'typewriter keyboard', 923: 'plate', 954: 'banana', 968: 'cup' }

select folder with specific target

target_label = 954

dataset_folder = os.path.join(dataset_folder, str(target_label)) normalizer = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) transforms = transforms.Compose([ transforms.ToTensor(), normalizer ])

dataset = ImageFolderWithEmptyDirs(dataset_folder, transform=transforms) model = models.resnet50(pretrained=True) loader = torch.utils.data.DataLoader(dataset, shuffle=True, batch_size=5) model.eval()

batches = 10 correct, attack_success, total = 0, 0, 0 for batch_idx, (images, labels) in enumerate(loader): if batch_idx == batches: break pred = model(images).argmax(dim=1) correct += (pred == labels).sum() attack_success += sum(pred == target_label) total += pred.shape[0]

accuracy = correct / total attack_sr = attack_success / total

print("Robust Accuracy: ", accuracy) print("Attack Success: ", attack_sr)

Search
Clear search
Close search
Google apps
Main menu