Planetoid's official library to access free API
Project description
Planetoid API
Planetoid's API official library to access free APIs
About The API
Planetoid's official library to access free APIs!
Built With
Getting Started
Prerequisites
- Python 3
Installation
-
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for planetoidAI-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e041f8d63e43fe39f9362e0ae72c1fc6a5e178d24e8790f3dfbbb3de5aeaafb |
|
MD5 | b47226234d72746f66f48bc9bc1476ac |
|
BLAKE2b-256 | 8eedf6f5653d26f6c2f9086259682609d9b0529914da73aa874033b3da527596 |