Skip to content

HimanshuMoliya/planetoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planetoid API

Planetoid's API official library to access free APIs

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)

About

Planetoid's API official library to access free APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages