AIOmarRehan/Animal-Image-Classification-Using-CNN
Image Classification • Updated • 2
Error code: JWTInvalidSignature
Exception: InvalidSignatureError
Message: Signature verification failed
Traceback: Traceback (most recent call last):
File "/src/libs/libapi/src/libapi/jwt_token.py", line 286, in validate_jwt
decoded = jwt.decode(
jwt=token,
...<2 lines>...
options=options,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jwt.py", line 368, in decode
decoded = self.decode_complete(
jwt,
...<8 lines>...
leeway=leeway,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jwt.py", line 265, in decode_complete
decoded = self._jws.decode_complete(
jwt,
...<3 lines>...
detached_payload=detached_payload,
)
File "/usr/local/lib/python3.14/site-packages/jwt/api_jws.py", line 270, in decode_complete
self._verify_signature(
~~~~~~~~~~~~~~~~~~~~~~^
signing_input,
^^^^^^^^^^^^^^
...<4 lines>...
options=merged_options,
^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/jwt/api_jws.py", line 417, in _verify_signature
raise InvalidSignatureError("Signature verification failed")
jwt.exceptions.InvalidSignatureError: Signature verification failedNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
The dataset contains images of three animal classes: Cats, Dogs, and Snakes. It is balanced and cleaned, designed for supervised image classification tasks.
| Class | Number of Images | Description |
|---|---|---|
| Cats | 1,000 | Includes multiple breeds and poses |
| Dogs | 1,000 | Covers various breeds and backgrounds |
| Snakes | 1,000 | Includes multiple species and natural settings |
Total Images: 3,000
Image Properties:
| Set | Percentage | Number of Images |
|---|---|---|
| Training | 70% | 2,100 |
| Validation | 15% | 450 |
| Test | 15% | 450 |
Images in the dataset have been standardized to support machine learning pipelines:
import os
import tensorflow as tf
from tensorflow.keras.preprocessing.image import ImageDataGenerator
# Path to dataset
dataset_path = "path/to/dataset"
# ImageDataGenerator for preprocessing
datagen = ImageDataGenerator(
rescale=1./255,
validation_split=0.15 # 15% for validation
)
# Load training data
train_generator = datagen.flow_from_directory(
dataset_path,
target_size=(224, 224),
batch_size=32,
class_mode='categorical',
subset='training',
shuffle=True
)
# Load validation data
validation_generator = datagen.flow_from_directory(
dataset_path,
target_size=(224, 224),
batch_size=32,
class_mode='categorical',
subset='validation',
shuffle=False
)
# Example: Iterate over one batch
images, labels = next(train_generator)
print(images.shape, labels.shape) # (32, 224, 224, 3) (32, 3)