mesamunefire

joined 2 years ago
MODERATOR OF
[–] mesamunefire 15 points 2 hours ago (2 children)

The mastodon developers are us.

It's open source so yeah...my PRS are part of the community. And so are yours. And projects like GoToSocial make it seemless if someone wants to implement the same protocol in a slightly different way.

[–] mesamunefire 3 points 3 hours ago

I'm loving what the Doug Doug community did for the aquarium. And that Rosa was the main attraction for them.

[–] mesamunefire 1 points 16 hours ago* (last edited 16 hours ago)

I have a project like it. Lots of collective commons, free books, lots of things without copyright. It's a box anyone can get into in a localized area. On a pi zero w. Fun little project to put together.

Lots of Wikipedia and text to be honest.

[–] mesamunefire 4 points 18 hours ago (1 children)

Journey to the microcosmose is pretty great.

[–] mesamunefire 4 points 18 hours ago (2 children)

I'm thinking of getting a uconsole for this very reason.

[–] mesamunefire 3 points 21 hours ago

Great video.

[–] mesamunefire 2 points 21 hours ago

Ill try it out. I put psm 11 at one point, but got 000000 back out unless my camera was just in the perfect spot. Then i would get around 1/2 the numbers right.

[–] mesamunefire 1 points 22 hours ago

the easyocr version somewhat works...but still having issues when its actually outside. Thought I would ask if anyone has figured out this issue before. Ill keep hacking away at it, but thought I would ask if the API is viable.

[–] mesamunefire 2 points 22 hours ago (1 children)
import cv2
import easyocr
import numpy as np
from PIL import Image
from collections import Counter

# Initialize the EasyOCR reader
reader = easyocr.Reader(['en'])

def preprocess_image(image):
    # Convert to PIL image for EasyOCR processing
    return Image.fromarray(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))

def recognize_text(image):
    processed_image = preprocess_image(image)
    results = reader.readtext(np.array(processed_image), allowlist='0123456789')
    # Concatenate all recognized text results
    recognized_text = ''.join(result[1] for result in results)
    return recognized_text

def format_number(text, length=6):
    # Remove non-numeric characters and pad with zeros if necessary
    formatted = ''.join(filter(str.isdigit, text))
    return formatted.zfill(length)[-length:]

def most_common_number(numbers):
    # Find the most common number from the list of numbers
    counter = Counter(numbers)
    most_common = counter.most_common(1)
    return most_common[0][0] if most_common else ''

def main():
    cap = cv2.VideoCapture(2)

    if not cap.isOpened():
        print("Error: Could not open webcam.")
        return

    print("Press 'q' to quit.")
    frame_count = 0
    text_history = []

    while True:
        ret, frame = cap.read()
        if not ret:
            print("Error: Failed to capture image.")
            break

        # Recognize text from the current frame
        recognized_text = recognize_text(frame)
        formatted_number = format_number(recognized_text)

        # Update the history with the latest recognized number
        text_history.append(formatted_number)

        # Keep only the last 10 frames
        if len(text_history) > 20:
            text_history.pop(0)

        # Determine the most common number from the history
        most_common = most_common_number(text_history)
        print(f"Most common number from last 10 frames: {most_common}")

        # if cv2.waitKey(1) & 0xFF == ord('q'):
        #     break

    cap.release()

if __name__ == "__main__":
    main()

 

I created a solution...with a pi 4 but it just doesn't seem to work very well. OCR is very finicky and while I was able to get pytesseract to pull the images off of a webcam, the numbers that get returned are very wrong. It looks like they only allow businesses to pull the powermeter data if I am reading this right: https://www.pge.com/en/save-energy-and-money/energy-saving-programs/smartmeter.html

My rate has increased 6 times this year, so power is very expensive here: 50c per KWH...on the lowest consumption rate. I need to figure out how to cut back or get solar panels. But I want to see in near real time how much energy we are using.

[–] mesamunefire 1 points 1 day ago

No idea. I would assume it's the same as all other activityhub providers.

[–] mesamunefire 31 points 1 day ago (5 children)

It took a bit but legitimate repo owners are starting to come over to codeberg and other alternative git sites. If we can get federation working it will be even better.

My GitHub account is getting swamped with AI created accounts following my account because it makes them look legit. It's getting pretty bad...

[–] mesamunefire 7 points 1 day ago

Composer + other hosting is a much better spot in my opinion.

 

Friend of mine created an event tracker.

 

This video kept getting copyright striked on a small creator. So ifixit decided to throw it onto their channel.

view more: next ›