Skip to content

sagnik1511/African-Wildlife-Animal-Recognition-with-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Africal wildlife Prediction using CNN

Pretrained VGG Prediction over African Wildlife

Dataset :

Link : https://www.kaggle.com/biancaferreira/african-wildlife

Data directory :

                          root/
                          ├─ buffalo/
                             ├─ 001.jpg
                             ├─ 001.txt
                          elephant/
                             ├─ 001.jpg
                             ├─ 001.txt
                          rhino/
                             ├─ 001.jpg
                             ├─ 001.txt
                          zebra/
                             ├─ 001.jpg
                             ├─ 001.txt

Model Evaluation :

Prediction :

Train accuracy is near : 99.2%

Validation accuracy is near : 86%

Predict function :

                                 def predict(path):
                                      img = cv2.imread( path )
                                      img = cv2.cvtColor( img , cv2.COLOR_BGR2RGB)
                                      img = cv2.resize( img , (256,256) )
                                      img = img.reshape(1 , 256 , 256 , 3)
                                      pred = np.argmax( clf.predict(img) )
                                      plt.imshow(img.reshape( 256 , 256 ,3))
                                      plt.title(f'Prediction : {classes[pred]}')

Results :

Do Star the repository :)

Thank You for visiting :)

Releases

No releases published

Packages

No packages published

Languages