Object Detection

This Python script can be used to train a convolutional neural network (CNN) model on a dataset of images and then use the trained model to perform real-time object detection on live video frames.

Installation

  1. Clone the repository to your local machine using the command git clone <repository_url>.
  2. Install the required packages using the command pip install -r requirements.txt.

Usage

  1. Set the directory containing the dataset of images by changing the dataset_dir variable in the script.
  2. Set the input shape of the images by changing the input_shape variable in the script.
  3. Split the dataset into training and testing sets by changing the test_size parameter in the train_test_split function.
  4. Set the number of epochs and batch size for training by changing the epochs and batch_size parameters in the model.fit function.
  5. Run the script using the command python object_detection.py.
  6. The script will train the CNN model on the dataset and save the trained model to a file named model.h5.
  7. The script will also open a live video stream and perform real-time object detection on the frames using the trained model. The predicted label for each frame will be displayed on the video.

Note: The script assumes that the dataset of images is organized into subdirectories, with each subdirectory containing images of a single class. The name of each subdirectory is used as the label for the images in that subdirectory. If your dataset is organized differently, modify the script accordingly.

Credits

This project was created by NSTHEHACKER . If you have any questions or feedback, please feel free to contact me at nakeeranthavasiappan@gmail.com .

License

This project is licensed under the MIT License - see the LICENSE file for details. <------------------------------------------------------------------------------------------------------>

Image Resizer

This Python script can be used to resize images in a directory to a specified target size. The resized images are saved to a specified output directory.

Installation

  1. Clone the repository to your local machine using the command git clone <repository_url>.
  2. Install the required packages using the command pip install -r requirements.txt.

Usage

  1. Set the directory containing the images by changing the image_directory variable in the script.
  2. Set the target size for resizing by changing the target_size variable in the script.
  3. Set the directory to store resized images by changing the output_directory variable in the script.
  4. Run the script using the command python resize_images.py.
  5. Check the output directory for the resized images.

Note: The script only resizes images with the file extensions ".jpg" and ".png". If you have images with other file extensions, modify the script accordingly.