Giter Club home page Giter Club 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 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.