"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

March 07, 2019

Day #218 - Working on gluoncv, anaconda and Windows 10

In my base Anaconda 3+ Environment,

pip install gluoncv
pip install mxnet

Download model from https://modelzoo.co/model/ssd-mxnet, This step was not required, Figured out later this was due to below package issues scipy and matplotlib.

Error in Call back
pip uninstall scipy
pip install scipy
pip uninstall matplotlib
pip install matplotlib

Below is example code

import mxnet as mx
import numpy as np
from mxnet import gluon, nd
from mxnet.gluon import nn
from mxnet.gluon.data.vision import transforms
from gluoncv import model_zoo, data, utils
from matplotlib import pyplot as plt
net = model_zoo.get_model('ssd_512_vgg16_atrous_voc', pretrained=True)
im_fname = utils.download('https://github.com/dmlc/web-data/blob/master/' +
'gluoncv/detection/street_small.jpg?raw=true',
path='street_small.jpg')
x, img = data.transforms.presets.ssd.load_test(im_fname, short=512)
print('Shape of pre-processed image:', x.shape)
class_IDs, scores, bounding_boxes = net(x)
ax = utils.viz.plot_bbox(img, bounding_boxes[0], scores[0],class_IDs[0], class_names=net.classes)
plt.show()
#https://github.com/ThomasDelteil/ObjectDetectionWebcam_MXNet/blob/master/detection.py
#https://github.com/ThomasDelteil/Awesome-MXNet#Vision
#https://github.com/ThomasDelteil/VisualSearch_MXNet
#https://thomasdelteil.github.io/FacialEmotionRecognition_MXNet/
#https://github.com/TalkAI/facial-emotion-recognition-gluon/blob/master/notebooks/Gluon_FERPlus.ipynb
Data gets downloaded to location
C:\Users\#user#\.mxnet\models

The Output example is




Happy Mastering DL!!!

No comments: