Skip to main content

Planetoid's official library to access free API

Project description

Planetoid API

Planetoid's API official library to access free APIs

Forks Stargazers Issues MIT License LinkedIn


About The API

Planetoid's official library to access free APIs!

Explore more »

Built With

Getting Started

Prerequisites

  • Python 3

Installation

  1. Install pip package

    pip install planetoidAI
    

Usage

Useful examples of how a project can be used.

Create a new python file anywhere, such as demo.py. Add code in the demo.py file, the sample code is as follows:

1. Object detection

from planetoidAI import Planetoid

planetoid1 = Planetoid()

# Get_objects_from_image

object_list = planetoid1.get_objects_from_image("FILENAME.jpg")

print(object_list)

OUTPUT

[{
'name': 'Object', 
'class_name': 'person', 
'score': 0.5407423377037048, 
'y': 0.215625, 'x': 0.090625, 'height': 0.984375, 'width': 0.896875
}]

2. Get face location from image

from planetoidAI import Planetoid

planetoid1 = Planetoid()

# Get_face_location_from_image
face_276 = planetoid1.get_face_location_from_image( filename= "FILENAME.jpeg")
print(face_276)

OUTPUT

[{
'name': 'Object', 
'class_name': 'face', 
'score': 0.9999943971633911, 
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]

3. Age and gender recognition

from planetoidAI import Planetoid

planetoid1 = Planetoid()

# Get_age_gender_from_image
age_gender = planetoid1.get_age_gender_from_image("FILENAME.jpeg")
print(age_gender)

OUTPUT

[{
'name': 'Object', 
'class_name': 'male, 
Age: (15-17)', 
'score': 0.4520128, 
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]

4. Nationality recognition (Face race)

from planetoidAI import Planetoid

planetoid1 = Planetoid()

# Get_face_race_from_image
nationality = planetoid1.get_face_race_from_image("FILEMNAME.jpeg")
print(nationality)

OUTPUT

[{
'name': 'Object', 
'class_name': 'Indian', 
'score': 0.97603726, 
'y': 0.30875, 'x': 0.32625, 'height': 0.65375, 'width': 0.67125
}]

5. Language translation

from planetoidAI import Planetoid

planetoid1 = Planetoid()

# Get_translation
translation = planetoid1.get_translation("hello", translate_to='gu')
print(translation)

OUTPUT

{'translation': 'નમસ્તે'}

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Himanshu Molya

Project Link: https://github.com/HimanshuMoliya/planetoid

Acknowledgments

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

planetoidAI-0.0.2.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

planetoidAI-0.0.2-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page