Datasets:
image imagewidth (px) 100 6.48k | label class label 21
classes |
|---|---|
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
0Earth | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
2Exoplanets pt2 | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets | |
1Exoplanets |
HyzeACR (Astronomical Character Recognition)
An Image Classification model that detects galaxies, moons, planets, and nebulaes using TensorFlow and Keras
The Live Demo
Go to https://hyzeacr.netlify.app
HyzeACR Polaris
HyzeACR Polaris is an AI-powered astronomy image classification model designed to identify and categorize space objects from images with high accuracy.
Built as part of the Hyze ecosystem, Polaris focuses on real-world astronomical data and supports a wide range of celestial object classes.
Features
- Classifies multiple types of space objects
- Deep learning–based image recognition
- Designed for astronomy research and exploration
- Fast and efficient inference
- Built for integration with Hyze AI systems
Supported Classes
HyzeACR Polaris can detect and classify the following categories:
- Moon
- Nebula
- Black Hole / Quasar
- Lensed Quasar
- Earth
- Exoplanet
- Solar System Planets
- Unknown
- Star Clusters
- Galaxy
- Galaxy Cluster
Use Cases
- Astronomy research and education
- Space image labeling and organization
- AI-powered space exploration tools
- Integration into astronomy apps and platforms
- Dataset preprocessing and classification
Usage
Python (Keras)
from keras.models import load_model
from PIL import Image, ImageOps
import numpy as np
np.set_printoptions(suppress=True)
model = load_model("keras_Model.h5", compile=False)
class_names = open("labels.txt", "r").readlines()
data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32)
image = Image.open("<IMAGE_PATH>").convert("RGB")
size = (224, 224)
image = ImageOps.fit(image, size, Image.Resampling.LANCZOS)
image_array = np.asarray(image)
normalized_image_array = (image_array.astype(np.float32) / 127.5) - 1
data[0] = normalized_image_array
prediction = model.predict(data)
index = np.argmax(prediction)
class_name = class_names[index]
confidence_score = prediction[0][index]
print("Class:", class_name[2:], end="")
print("Confidence Score:", confidence_score)
Python (OpenCV + Keras)
from keras.models import load_model
import cv2
import numpy as np
np.set_printoptions(suppress=True)
model = load_model("keras_Model.h5", compile=False)
class_names = open("labels.txt", "r").readlines()
camera = cv2.VideoCapture(0)
while True:
ret, image = camera.read()
image = cv2.resize(image, (224, 224), interpolation=cv2.INTER_AREA)
cv2.imshow("Webcam Image", image)
image = np.asarray(image, dtype=np.float32).reshape(1, 224, 224, 3)
image = (image / 127.5) - 1
prediction = model.predict(image)
index = np.argmax(prediction)
class_name = class_names[index]
confidence_score = prediction[0][index]
print("Class:", class_name[2:], end="")
print("Confidence Score:", str(np.round(confidence_score * 100))[:-2], "%")
if cv2.waitKey(1) == 27:
break
camera.release()
cv2.destroyAllWindows()
Google Coral (Edge TPU)
Install dependencies:
python3 -m pip install --extra-index-url https://google-coral.github.io/py-repo/ pycoral~=2.0 Pillow opencv-python opencv-contrib-python
Run inference:
import cv2
from pycoral.utils.dataset import read_label_file
from pycoral.utils.edgetpu import make_interpreter
from pycoral.adapters import common, classify
modelPath = '<PATH_TO_MODEL>'
labelPath = '<PATH_TO_LABELS>'
def classifyImage(interpreter, image):
size = common.input_size(interpreter)
common.set_input(interpreter, cv2.resize(image, size, interpolation=cv2.INTER_CUBIC))
interpreter.invoke()
return classify.get_classes(interpreter)
def main():
interpreter = make_interpreter(modelPath)
interpreter.allocate_tensors()
labels = read_label_file(labelPath)
cap = cv2.VideoCapture(0)
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
frame = cv2.flip(frame, 1)
results = classifyImage(interpreter, frame)
cv2.imshow('frame', frame)
print(f'Label: {labels[results[0].id]}, Score: {results[0].score}')
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
if __name__ == '__main__':
main()
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve the model, dataset, or performance.
License
This project is licensed under the MIT License.
Part of Hyze
HyzeACR Polaris is part of the Hyze AI ecosystem, focused on building powerful, accessible AI tools across multiple domains.
Support
If you like this project, consider starring the repo and sharing it!
- Downloads last month
- 883