npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-image-detective

v1.0.6

Published

React Native library to simplify the integration of AI and ML features into your mobile app.

Downloads

4

Readme

react-native-image-detective

cover ✨ ALL IN ONE, ALL IN JUST ONE LINE ✨

late-night brain sessions often lead to interesting questions. lately, I've been pondering: "can React Native and the wild world of AI/ML join forces and create some magic? yes, they totally can!" 😎 not one to let dreams stay as dreams, I dived into research mode. the burning question led me to a fascinating project where React Native and AI/ML got cozy. why all this fuss? well, I'm on a mission to shake things up in the React Native community. forget pointing fingers, let's make it better together. this journey might be a baby step, but hey, even small steps can leave giant footprints. powered by Google's MLKit, I whipped up native modules for Android (using Java), iOS (using Objective C) and TypeScript 🚀✨

Features

well, I'm striving to make this library easy to integrate and user-friendly with minimal effort, so let's get started!

  1. Face Detection
  2. Barcode Scanner
  3. Image Labeler
  4. Coming Soon ! 🚀

Installation

npm install react-native-image-detective
or
yarn add react-native-image-detective

npx pod-install

Usage

select a picture from either your camera or device using another library of your choice. in this example folderI've used react-native-image-picker

  1. Face Detection face-detection-demo
import ImageDetective from 'react-native-image-detective';

// ... blablababla

const onImageChanges = async (res: ImagePickerResponse) => {
    try {
      if (!res.assets || !res.assets[0]?.uri) {
        return;
      }

      const imagePath = res.assets[0].uri;
      // MAIN CODE
      const image = await ImageDetective.analyzeFace(imagePath);
      // END OF MAIN CODE

      console.log('[Image response] :', image.faces);

      if (image.isValid) {
        Alert.alert(
          'Face detected',
          'Hoorayy !!'
        );
      } else {
        Alert.alert(
          'Face not detected',
          'Please reupload an image with your face in it.'
        );
      }
    } catch (error) {
      console.log('error', error);
    }
  };
  1. Barcode Scanner barcode-scanner-demo supports the following formats: Code-128, 39, 93, Codabar, Data Matrix, EAN-13, EAN-8, ITF, QR Code, UPC-A, UPC-E, PDF-417, and Aztec Code.
import ImageDetective from 'react-native-image-detective';

// ... blablababla

  const onBarcodeScan = async (res: ImagePickerResponse) => {
    try {
      if (!res.assets || !res.assets[0]?.uri) {
        return;
      }

      const imagePath = res.assets[0].uri;
      // MAIN CODE
      const barcode = await ImageDetective.analyzeBarcode(imagePath);
      // END OF MAIN CODE
      console.log('[barcode response] :', JSON.stringify(barcode));

      if (barcode.isValid) {
        Alert.alert('barcode result', JSON.stringify(barcode));
      } else {
        Alert.alert('Barcode not detected', 'Please reupload a barcode in it.');
      }
    } catch (error) {
      console.log('error', error);
    }
  };
  1. Image Labeler image-labeler-demo
import ImageDetective from 'react-native-image-detective';

const onImageLabeler = async (res: ImagePickerResponse) => {
    try {
      if (!res.assets || !res.assets[0]?.uri) {
        return;
      }

      const imagePath = res.assets[0].uri;
      // MAIN CODE
      const imageLabeler = await ImageDetective.analyzeImage(imagePath);
      // END OF MAIN CODE
      
      if (imageLabeler.isValid) {
        console.log('[image labeler response] :', JSON.stringify(imageLabeler));
      } else {
        Alert.alert('Oopss!', 'error !');
      }
    } catch (error) {
      console.log('error', error);
    }
  };
  1. coming soon ! 🚀

Contributing

Please help me make this library both fun and useful to use. Share your ideas about what AI/ML features could be on the list for the next version!

License

MIT


Made with ❤️ by @rbayuokt, thanks to create-react-native-library