SShortSingh.
Back to feed

Tutorial: AI Pipeline Uses GPT-4o and SAM to Estimate Calories from Food Photos

0
·3 views

A new developer tutorial on DEV Community demonstrates how to build an automated food nutrition estimation system using a combination of AI tools. The pipeline uses Meta's Segment Anything Model (SAM) to isolate individual food items in an image before passing them to OpenAI's GPT-4o Vision for ingredient identification and weight estimation. To reduce the risk of AI-generated inaccuracies, the system cross-references GPT-4o outputs against a verified nutritional database stored in PostgreSQL using the pgvector extension for similarity search. The full-stack guide covers tools including FastAPI, PyTorch, and Python 3.10+, and is aimed at developers interested in multimodal AI, retrieval-augmented generation, and health-tech applications.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Week 5 ML Series: How Tensors Power Every AI Model, From CPU to GPU

A developer progressing through a 32-week machine learning curriculum reached Week 5, focusing on tensors — the core data structure underlying all AI models. Tensors are typed, multi-dimensional arrays that can reside on either a CPU or GPU, and are described by their rank, shape, dtype, and device. The session introduced scalars, vectors, matrices, and higher-dimensional tensors using PyTorch, with hands-on scripts demonstrating element-wise operations, broadcasting, and CPU-to-GPU memory transfers. All experiments were run remotely via SSH on an NVIDIA DGX Spark machine using a pre-configured PyTorch environment with CUDA support. This week also marked the start of a parallel CUDA track within the broader goal of understanding how machine learning inference works at a low level.

0
ProgrammingDEV Community ·

OliverGraph Aims to Give AI Agents Shared Context Across Engineering Teams

A startup called OliverGraph is building a platform to address a growing problem in software teams: AI coding agents operate in isolated sessions, causing critical context to be lost when a run ends. When multiple engineers use separate agents simultaneously — such as during an outage — findings and decisions made by one agent are invisible to others, leading to duplicated or conflicting work. The tool aims to capture what each agent did, why it acted, and what it changed, then link that history to existing artifacts like pull requests, documents, and incidents. This connected history can then be fed back into future agent sessions, so new agents benefit from what previous ones already learned. OliverGraph is currently seeking early-adopter engineering teams to trial the platform.

0
ProgrammingDEV Community ·

How to Build a Secure Password Reset Email Flow Using an Email API

A developer tutorial on DEV Community outlines a step-by-step approach to implementing password reset emails in a backend application using an email API called Notify. The flow involves generating a cryptographically secure, short-lived token, storing only its hashed version in the database, and sending the raw token to the user via a reset link. When the user submits a new password, the backend hashes the received token, compares it against the stored hash, and invalidates it after a single use. The guide recommends a token expiry window of 15 to 60 minutes, enforcing HTTPS throughout, and rate-limiting reset requests to prevent abuse. It also covers optional webhook registration to automatically detect email bounces without manual intervention.

0
ProgrammingDEV Community ·

PawSafe App Uses Google Gemini AI to Tell Dog Owners Which Foods Are Safe

A developer has built PawSafe, an AI-powered web application designed to help dog owners quickly determine whether a particular food is safe for their pets. Users can submit a food name, upload a photo, or both, and the app returns one of four safety ratings along with explanations and safer alternatives. The tool is powered by Google's Gemini API, which handles both text and image analysis on the backend to keep the API key secure. Built with a React frontend and a Node.js/Express backend, PawSafe was created to spare dog owners the hassle of searching multiple sources for food safety information. The project was submitted to the DEV Community's Weekend Challenge: Dog Days Edition, competing in the Best Use of Google AI category.