Angualr js is angular 1 is angular js after that in 2016 angular 2 is introduced which is complete change of angular js or complete re-write. angular 3 is skipped after that every six month angular version is updated with small.incremental,backwards-compatible changes. Now currently angular 9 is running. Angular 9 is basically same as angular 2. and also angular 10 will be same with slightly change.
Here, Python programming language, Keras library is used to manipulate raw input image. To train on CNN architecture and creating a machine learning model that can predict the type of diseases, image data is collected from ourselves and the authenticated online source. As the result, few diseases that usually occurs in tomato plants such as Late blight (training 100, test 21), Gray spot (training 95, test 18) and bacterial canker (training 90, test 21) are detected. So, basically this project is a way to digitize the information in an image for the purpose of convenient retrieval and efficient processing of data. Dataset Preparation, Image processing of a certain level and a Convolutional Neural Network as a classifier are the three main areas, in which this project is completely relying on. The prime focus of this project is firstly to design a convolutional neural network with suitable parameters and train it with a dataset of our own. Finally, predicting the classes in an input image by processing the image into a desired format and then feeding it into the trained neural network.
Dataset For the Tomato Deases Prediction:
Code for this project:
import numpy as np import keras from keras import backend as K from keras.models import Sequential from keras.layers import Activation from keras.layers.core import Dense,Flatten from keras.optimizers import Adam from keras.metrics import categorical_crossentropy from keras.preprocessing.image import ImageDataGenerator from keras.layers.normalization import BatchNormalization from keras.layers.convolutional import * from matplotlib import pyplot as plt from sklearn.metrics import confusion_matrix import itertools import matplotlib.pyplot as plt %matplotlib inline from keras.applications import VGG16#Load the VGG modelvgg_conv = VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
# Freeze the layers except the last 6 layers for layer in vgg_conv.layers[:-7]: layer.trainable = False # Check the trainable status of the individual layers for layer in vgg_conv.layers: print(layer, layer.trainable)
vgg_conv.summary() from keras import models from keras import layers from keras import optimizers from keras.regularizers import l2 # Create the model model = models.Sequential() # Add the vgg convolutional base model model.add(vgg_conv) # Add new layers model.add(layers.Dropout(0.25)) model.add(layers.Flatten()) model.add(layers.Dropout(0.4)) model.add(layers.Dense(512,kernel_regularizer=l2(0.01), bias_regularizer=l2(0.01),activation='relu')) model.add(layers.Dense(8,kernel_regularizer=l2(0.01), bias_regularizer=l2(0.01),activation='softmax')) # "Show a summary of the model. Check the number of trainable parameters" model.summary() import tensorflow as tf tf.test.gpu_device_name() # this code to is to connect the google drive with google #colab from google.colab import drive drive.mount('/content/drive') import tarfile #importing tarfile to extract the tarfile where dataset is located train_path='proj/train' test_path='proj/test' valid_path='proj/valid' train_generator=ImageDataGenerator().flow_from_directory(train_path,target_size=(224,224),classes=['anthracnose','calciumdefficiency','healthy','lateblight','bacterialSpot','tomatomosaic','yellowcurved','septorailleafspot'],batch_size=10) validation_generator=ImageDataGenerator().flow_from_directory(valid_path,target_size=(224,224),classes=['anthracnose','calciumdefficiency','healthy','lateblight','bacterialSpot','tomatomosaic','yellowcurved','septorailleafspot'],batch_size=10) test_batches=ImageDataGenerator().flow_from_directory(test_path,target_size=(224,224),classes=['anthracnose','calciumdefficiency','healthy','lateblight','bacterialSpot','tomatomosaic','yellowcurved','septorailleafspot'],batch_size=10) from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True train_datagen = ImageDataGenerator( rescale=1./255, rotation_range=20, width_shift_range=0.2, height_shift_range=0.2, horizontal_flip=True, fill_mode='nearest') validation_datagen = ImageDataGenerator(rescale=1./255) # Change the batchsize according to your system RAM train_batchsize = 62 val_batchsize = 10 # Compile the model model.compile(loss='categorical_crossentropy', optimizer=optimizers.RMSprop(lr=1e-5), metrics=['acc']) # Train the model history = model.fit_generator( train_generator, steps_per_epoch=train_generator.samples/train_generator.batch_size , epochs=25, validation_data=validation_generator, validation_steps=validation_generator.samples/validation_generator.batch_size, verbose=1) # Save the model model.save('trainedmodel_10.h5') test_eval = model.evaluate(test_batches, verbose=0) print("Test Loss:",test_eval) print("Test Accuracy:",test_eval) print("Test Loss:",test_eval) print("Test Accuracy:",test_eval)
At first to become a web developer we should know about the Html
What is Html ?
- It is the language used to display the content in websites
- Html stands for Hypertext markup language
If you are completely beginner the above two lines also be the confusing but dont worry you understand when you do
Learning CSS(Cascading Style Sheet)
It is the styling language, that is it gives the style to the websites.with combination with the html it makes the uglier websites with only html gives beautiful looks.Best one Tutorial From Youtube
User should be able to log in
User should be able to register
User should be able to see a list of users
User should be able to message another user
Everything starts with the user..
In this module we know
How we store the password in the Database;
creating the User Model
the repository Pattern
Creating the Authentication Controller
Data Transfer Objects
- After the migration to create table on the database we use the following command in package manager
dotnet ef database update
This is the error due to not specifying package version while installing package so specify the version of package you want to install..write command like below in dotnet cli or in package manager console
dotnet add package Microsoft.EntityFrameworkCore.SqlServer –version 3.1.0
visit this site :https://www.nuget.org/packages