Using Custom CNN to predict images of African Wildlife
# Africal wildlife Prediction using CNN
Pretrained VGG Prediction over African Wildlife
---
### Dataset :
Link :
kaggle.com
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 :)