Giter VIP home page Giter VIP logo

speks7 / nazar Goto Github PK

View Code? Open in Web Editor NEW
32.0 6.0 9.0 75.64 MB

Electronic component detection, identification and recognition system in realtime from camera image using react-native and tensorflow for classification along with Clarifai API with option to search the component details from web with description shown from Octopart fetched from server

Home Page: https://play.google.com/store/apps/details?id=com.speks.nazar

License: Apache License 2.0

JavaScript 84.02% Python 3.42% Java 4.88% Objective-C 7.68%
react react-native android ios camera tensorflow tensorflow-classification clarifai-api mobile image

nazar's Introduction

Nazar

icon

Electronic component detection system with server: Nazar Server

Overview

Nazar is an app built with react-native with a little spice of Tensorflow InveptionV3 which allows the user to take a picture using the camera or fetch image from gallery to identify the component with the predicted percentage ratio, thus using image processing and algorithm to segment them after detection along with fetching description about the detected component using Octopart API whose response is sent from the nazar-server itself.

It is done with both Clarifai API and Tensorflow frozen graph server deployed in heroku to deduce with internet along with option to look for feeds from internet within the app. The Option to fetch the details about detected component is setup but needs furnishing.

Run both on iOS and Android

Demo

Nazar demo

Information

    

Main View Image Picker Online analysis Realtime Analysis

Installation

Clone the source locally:

$ git clone https://github.com/aryaminus/nazar
$ cd nazar

Start the application in development mode

npm install
react-native link
react-native run-android
react-native run-ios

or for VS-Code:

npm install
react-native link

then press F1 or Fn+F1 and React Native:Run Android on Device or React Native:Run iOS on Simulator

References

  1. react-native-live-translator
  2. seepizz
  3. tensorflow-for-poets
  4. Generate Signed APK

Contributing

  1. Fork it (https://github.com/aryaminus/nazar/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

nazar's People

Contributors

aryaminus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nazar's Issues

Undefined is not an object (tensorflow ImageRecognition)

When trying to integrate a pretrained tensorflow model with expo (react-native), the following error occurs within these lines:

_graph = async () => {
        try {
            const tfImageRecognition = new TfImageRecognition({
                model: require('./assets/tensorflow_inception_graph.pb'),
                labels: require('./assets/tensorflow_labels.txt')
            });
    
            const results = await tfImageRecognition.recognize({
              image: this.state.image
            }); 
            results.forEach(
              result => ((preder2 = result.confidence), (items = result.name))
            );
            await tfImageRecognition.close();  
            this.setState({
              result: items,
              value: preder2 * 100 + "%"
            });
            console.log(this.state.result);
          } catch (err) {
            this.setState({
              result: "No Internet",
              value: "Please connect to the internet"
            });
            console.log(err);
          }
    }

Which generates the following error

10:10:40 AM: undefined is not an object (evaluating 'RNImageRecognition.initImageRecognizer')

I have been trying to find the reason why this is not working but I cannot find a definite solution. The relative paths linking to the assets are correct and the extensions are present in the app.json. Furthermore the model is trained using the tensorflow api which should make it compatible with the react-native implementation.

I observed that after running

const tfImageRecognition = new TfImageRecognition({

                model: require('./assets/tensorflow_inception_graph.pb'),
                labels: require('./assets/tensorflow_labels.txt')

            });

The code changed immediately to "catch(err)" branch, which means it could not load the model and labels?

I am using expo SDK version 28.0.0, Expo XDE and react-native-tensorflow version ^0.1.8
PLz help me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.