Posts

Showing posts from July, 2025

2-C .Understanding and Using ANN : Identifying age group of an actor

Image
  AIM :   Design Artificial Neural Networks for Identifying and Classifying an actor using Kaggle Dataset. Link to download Model file: https://drive.google.com/file/d/12lsyOHe5QifEaiW_d9K8BLLy5PeCEWsf/view?usp=sharing Link to Images to test: https://drive.google.com/drive/folders/1xhQJSzL_OL72YXBgdQD10_JmYpHPngLu?usp=sharing Program to predict Face Image's Age group: from tensorflow.keras.models import load_model from PIL import Image import numpy as np # Define the input image dimensions image_height = 128 image_width = 128 num_channels = 3 # Load the trained model model = load_model( '/content/drive/MyDrive/trained_model_C_Dataset.h5' ) # Replace 'your_trained_model.h5' with the actual file name # Read the new face image new_face_path = '/content/drive/MyDrive/2_Predict/old.jpeg'   # Replace 'path_to_new_face.jpg' with the actual file path new_face = Image. open (new_face_path) display(new_face) # Preprocess the image new_face = new_face.re...

Deep Learning Exp:1 V

  # Convolutional Neural Network # Installing Theano # pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git # Installing Tensorflow # Install Tensorflow from the website: https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html # Installing Keras # pip install --upgrade keras # Part 1 - Building the CNN # Importing the Keras libraries and packages from keras.models import Sequential from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense # Initialising the CNN classifier = Sequential() # Step 1 - Convolution classifier.add(Convolution2D( 32 , 3 , 3 , input_shape = ( 64 , 64 , 3 ), activation = 'relu' )) # Step 2 - Pooling classifier.add(MaxPooling2D(pool_size = ( 2 , 2 ))) # Adding a second convolutional layer classifier.add(Convolution2D( 32 , 3 , 3 , activation = 'relu' )) classifier.add(MaxPooling2D(pool_size = ( 2 , 2 ))) # Step 3 - Flattening ...