Dataset Viewer
The dataset viewer is not available for this subset.
Cannot get the split names for the config 'default' of the dataset.
Exception:    SplitsNotFoundError
Message:      The split names could not be parsed from the dataset config.
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
                  response.raise_for_status()
                File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1026, in raise_for_status
                  raise HTTPError(http_error_msg, response=self)
              requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/datasets/l985215117/WasteWise/resolve/5779978b3985a8acd0236b2ed094e2d676eaaf12/tensors/compostable/apple%20core_20250112_153935_1.jpg_v_filp.JPG.npy
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 289, in get_dataset_config_info
                  for split_generator in builder._split_generators(
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/folder_based_builder/folder_based_builder.py", line 129, in _split_generators
                  downloaded_dirs = dl_manager.download_and_extract(archives)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/download/streaming_download_manager.py", line 169, in download_and_extract
                  return self.extract(self.download(url_or_urls))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/download/streaming_download_manager.py", line 121, in extract
                  urlpaths = map_nested(self._extract, url_or_urls, map_tuple=True)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/py_utils.py", line 521, in map_nested
                  _single_map_nested((function, obj, batched, batch_size, types, None, True, None))
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/py_utils.py", line 382, in _single_map_nested
                  return function(data_struct)
                         ^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/download/streaming_download_manager.py", line 126, in _extract
                  protocol = _get_extraction_protocol(urlpath, download_config=self.download_config)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/file_utils.py", line 548, in _get_extraction_protocol
                  return _get_extraction_protocol_with_magic_number(f)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/file_utils.py", line 521, in _get_extraction_protocol_with_magic_number
                  magic_number = f.read(MAGIC_NUMBER_MAX_LENGTH)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/huggingface_hub/hf_file_system.py", line 1015, in read
                  return super().read(length)
                         ^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/spec.py", line 1846, in read
                  out = self.cache._fetch(self.loc, self.loc + length)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/fsspec/caching.py", line 189, in _fetch
                  self.cache = self.fetcher(start, end)  # new block replaces old
                               ^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/huggingface_hub/hf_file_system.py", line 976, in _fetch_range
                  hf_raise_for_status(r)
                File "/usr/local/lib/python3.12/site-packages/huggingface_hub/utils/_http.py", line 482, in hf_raise_for_status
                  raise _format(HfHubHTTPError, str(e), response) from e
              huggingface_hub.errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/datasets/l985215117/WasteWise/resolve/5779978b3985a8acd0236b2ed094e2d676eaaf12/tensors/compostable/apple%20core_20250112_153935_1.jpg_v_filp.JPG.npy (Request ID: Root=1-6942546c-6f7b985d58975bf12ec3818c;af8c801f-d302-4354-8564-4dae298f4034)
              
              maximum queue size reached
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 65, in compute_split_names_from_streaming_response
                  for split in get_dataset_split_names(
                               ^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 343, in get_dataset_split_names
                  info = get_dataset_config_info(
                         ^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 294, in get_dataset_config_info
                  raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
              datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Trash Classification Project

Overview

This project focuses on trash classification using machine learning, leveraging multiple datasets with a total of 8,895 images from diverse sources.

Datasets

1. Drinking Waste Classification

  • Images: 4,832
  • Organization: Directory-based sorting
  • Classes: 4 recyclable categories
    • Aluminium Cans
    • Glass Bottles
    • PET (Plastic) Bottles
    • HDPE (Plastic) Milk Bottles

2. TACO (Trash Annotations in Context)

  • Images: 1,530
  • Environment: Diverse settings (woods, roads, beaches)
  • Format: Raw images with annotation JSON
  • Note: Requires category mapping for proper sorting

3. TrashNet

  • Images: 2,533
  • Organization: Directory-based sorting
  • Classes: 6 categories
    • Cardboard
    • Glass
    • Metal
    • Paper
    • Plastic
    • Trash (miscellaneous)

4. Google Images API

  • Images: 4,500
  • Organization: Directory-based sorting
  • Collection: Scraping images from google images API to expand dataset.

Data Processing Pipeline

Image Augmentation

We apply 14 different manipulations to expand the dataset:

Transformation Description
Grayscale Convert to grayscale
Rotation 90°, 180°, 270° rotations
Flipping Horizontal and vertical flips
Noise Add random noise
Blur Apply Gaussian blur
Brightness Brighten and darken
Color Effects Invert colors, posterize, solarize
Equalization Histogram equalization

Standardization

  • All images are resized to 224×224 pixels
  • Stored as NumPy arrays (.npy) or PyTorch tensors

HuggingFace Dataset Upload Instructions

  1. Generate Image Variations

    python img_manipulation.py
    
  2. Standardize Images

    python standardize.py
    
  3. Upload to HuggingFace

    # Install HuggingFace CLI
    pip install huggingface_hub
    
    # Upload files
    python upload_files.py
    

    Note: Modify paths in upload_files.py to point to your data

Model Architecture: ResNet

We implement a ResNet (Residual Network) architecture for our trash classification task, leveraging the power of deep residual learning. ResNet represents a significant advancement over traditional Convolutional Neural Networks (CNNs) by introducing skip connections that allow information to bypass layers. This solution addresses the vanishing gradient problem that plagued deep networks, where gradients become extremely small during backpropagation, preventing effective training of deeper layers.

Unlike conventional CNNs where performance degrades as network depth increases beyond a certain point, ResNets can be substantially deeper (50, 101, or even 152 layers) while maintaining or improving accuracy. The key innovation is the residual block structure, which learns residual mappings instead of direct mappings, making optimization easier. This allows the network to decide whether to use or skip certain layers during training, effectively creating an ensemble of networks with different depths.

For our trash classification task, this architecture provides superior feature extraction capabilities, capturing both fine-grained details and higher-level abstractions necessary for distinguishing between various waste materials.

Key Features

  • Architecture: ResNet with Bottleneck blocks
  • Implementation: Built using TinyGrad for efficient training
  • Structure:
    • Initial 7×7 convolution with stride 2
    • Four residual layers with bottleneck blocks
    • Global average pooling
    • Fully connected layer for classification
  • Residual Learning: Uses skip connections to address the vanishing gradient problem
  • Configuration:
    • Input size: 224×224×3 (RGB images)
    • Output: 3 classes (Compostable, Non-recyclable, Recyclable)

Training Process

  • Optimizer: SGD with momentum (0.9)
  • Learning Rate: 0.001
  • Batch Size: Variable (configurable)
  • Metrics: Accuracy, Precision, Recall, F1-score

Performance Evaluation

The model is evaluated on a held-out test set with comprehensive metrics to ensure robust classification across all waste categories.

Downloads last month
12,226