Free ObjDetection API from EazyMind
Last Updated on July 20, 2023 by Editorial Team
Author(s): amr zaki
Originally published on Towards AI.
Object Detection Tutorial, Part I U+007C Towards AI
This tutorial series goes through the different APIs that EazyMind (an Ai-As-A-Service platform) offers. EazyMind offers multiple AI services for Free; Obj Detection is one of them!
EazyMind also offers Text Summarization as another free API.
Today we would go through how to use the ObjDetection API that EazyMind provides. We also go through how this API has been built under the hood, so letβs begin!!
1. How to use ObjDetecion Free API in your project
EazyMind provides its Free APIs as a python PyPI package, and you need to free register on EazyMind then use your key to access the API
- First free register on EazyMind
- Get your key
- Install python package
pip install eazymind
4. Then use the API itself
from eazymind.vision.eazyobjdetect import Detector
key = "xxxxxxxxxxxx"with open("image1.jpg" , "rb") as img:
detector = Detector(key)
detected_image = detector.run(img.read())
with open("out_detected.jpg" , "wb") as out_img:
out_img.write(detected_image)
Note: You can also use this API through curl calls
curl -X POST
http://eazymind.herokuapp.com/arabic_sum/eazyobjdetect
-F imagedata=@{imagefile}.jpg
-F key={eazymind api key}
-o {outputfile}.jpg
You can further extend this API and call it in any other language, as after all, it is just HTTP calls.
Now letβs learn more about how this API is built under the hood!!
2. How the API is built
We have created this API as an extension to the fantastic efforts by Google by making their work opensource, and I genuinely like to thank them for making their work available for the public, we have wrapped their work through an API inside EazyMind.
2a. Model used
Google has provided a list of models for ObjDetection, and they provide a balance between both speed and precision, we have chosen ssd_mobilenet_v1_coco as our model of choice
2b. Tensorflow model
We have used this code base and added it to EazyMind. It is built
EazyMind also offers Text Summarization as another free API, check it out !!
from eazymind.nlp.eazysum import Summarizer
key = "xxxxxxxxxxxx"sentence = """Facebook CEO Mark Zuckerberg, left, makes the keynote speech at F8, the Facebook's developer conference, Tuesday, April 30, 2019, in San Jose, Calif. (AP Photo/Tony Avelar )
Facebook says that, unlike its past, its future is privacy
A trader works ahead of the closing bell on the floor of the New York Stock Exchange (NYSE) on April 12, 2019 in New York City. (Photo by Johannes EISELE / AFP) (Photo credit should read JOHANNES EISELE/AFP/Getty Images)
Resilience is still the word for stocks"""summarizer = Summarizer(key)
print(summarizer.run(sentence))
If you enjoy the concept of Text Summarization, we have published multiple tutorials concerning this topic, and you can find the links to these blogs here, and the opensource code for it here.
I truly hope you have enjoyed reading this tutorial , and I truly hope you find these APIs helpful.
Follow EazyMind on Facebook page to enjoy a free consultation on AI projects.
hope to see you again when talking about other features of EazyMind to keep tuned π
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI