testdotai / appium-classifier-plugin

Apache License 2.0
259 stars 78 forks source link

Error: Prediction result array had 4 elements but labels list had 106 elements. They need to match. #23

Closed BSudheerR closed 5 years ago

BSudheerR commented 5 years ago

Hi All,

Getting the following Error , I have created my own data for Amazon Android App. Created Models with the guidance https://medium.com/testdotai/training-data-for-app-classifier-f217dc005523 . Getting this issue , while searching for a 'search' Icon

[debug] [WD Proxy] Got response with status 200: {"sessionId":"136b372d-1f75-42bf-b557-366a916766dc","status":0,"value":true} [debug] [W3C (1856affc)] Encountered internal error running command: Error: Prediction result array had 4 elements but labels list had 106 elements. They need to match. [debug] [W3C (1856affc)] at getConfidenceMap (/usr/local/lib/node_modules/appium/node_modules/test-ai-classifier/lib/classifier.js:130:11) [debug] [W3C (1856affc)] at predictionsFromImages (/usr/local/lib/node_modules/appium/node_modules/test-ai-classifier/lib/classifier.js:101:21) [debug] [W3C (1856affc)] at getMatchingElements (/usr/local/lib/node_modules/appium/node_modules/test-ai-classifier/lib/classifier.js:210:17) [debug] [W3C (1856affc)] at Object.find (/usr/local/lib/node_modules/appium/node_modules/test-ai-classifier/lib/classifier.js:275:12) [debug] [W3C (1856affc)] at condition (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/find.js:158:16) [debug] [W3C (1856affc)] at wrappedCondFn (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/timeout.js:157:12) [debug] [W3C (1856affc)] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:112:20) [debug] [W3C (1856affc)] at waitForCondition (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:125:10) [debug] [W3C (1856affc)] at AndroidUiautomator2Driver.implicitWaitForCondition (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/timeout.js:159:10) [debug] [W3C (1856affc)] at AndroidUiautomator2Driver.findByCustom (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/find.js:172:5) [debug] [W3C (1856affc)] at AndroidUiautomator2Driver.findElement (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/find.js:50:12) [HTTP] <-- POST /wd/hub/session/1856affc-ac0f-4e66-b9bb-5210dd5dfd14/element 500 14949 ms - 681 [HTTP]

swathiJaya commented 5 years ago

Hi, Looks like you have trained only four image categories and the labels.js has the default 106 image labels. Pl update the labels.js file with only the trained image data.

BSudheerR commented 5 years ago

Thanks @swathiJaya . I gone Bit Crazy Here , Yes you are right!!! I have forgotten to update the labels.js files under bin/ and build/bin/

Now It's Working fine....

swathiJaya commented 5 years ago

Hi @BSudheerR , can you please share the versions that you have used of the following:

Did you use pip for installation?

Thanks!

BSudheerR commented 5 years ago

Yes ... Hope this Helps..

$ pip list DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Package Version


-eras 2.2.4
-ix 1.12.0
absl-py 0.7.1
altgraph 0.10.2
appnope 0.1.0
asn1crypto 0.24.0
astor 0.8.0
backports-abc 0.5
backports.shutil-get-terminal-size 1.0.0
backports.weakref 1.0.post1
bdist-mpkg 0.5.0
bleach 1.5.0
bonjour-py 0.3
cffi 1.12.3
Click 7.0
cryptography 2.7
decorator 4.4.0
dlib 19.17.0
enum34 1.1.6
face-recognition 1.2.3
face-recognition-models 0.3.0
funcsigs 1.0.2
futures 3.2.0
gast 0.2.2
google-pasta 0.1.7
grpcio 1.21.1
h5py 2.8.0
html5lib 0.9999999
ipaddress 1.0.22
ipykernel 4.10.0
ipython 5.8.0
ipython-genutils 0.2.0
jupyter-client 5.2.4
jupyter-core 4.4.0
Keras 2.2.2
Keras-Applications 1.0.4
Keras-Preprocessing 1.0.2
macholib 1.5.1
Markdown 3.1.1
matplotlib 1.3.1
mock 3.0.5
modulegraph 0.10.4
nose 1.3.7
numpy 1.15.1
pandas 0.24.2
pathlib2 2.3.3
pexpect 4.7.0
pickleshare 0.7.5
Pillow 6.0.0
pip 19.1.1
prompt-toolkit 1.0.16
protobuf 3.8.0
ptyprocess 0.6.0
py2app 0.7.3
pycparser 2.19
Pygments 2.4.2
pyobjc-core 2.5.1
pyobjc-framework-Accounts 2.5.1
pyobjc-framework-AddressBook 2.5.1
pyobjc-framework-AppleScriptKit 2.5.1
pyobjc-framework-AppleScriptObjC 2.5.1
pyobjc-framework-Automator 2.5.1
pyobjc-framework-CFNetwork 2.5.1
pyobjc-framework-Cocoa 2.5.1
pyobjc-framework-Collaboration 2.5.1
pyobjc-framework-CoreData 2.5.1
pyobjc-framework-CoreLocation 2.5.1
pyobjc-framework-CoreText 2.5.1
pyobjc-framework-DictionaryServices 2.5.1
pyobjc-framework-EventKit 2.5.1
pyobjc-framework-ExceptionHandling 2.5.1
pyobjc-framework-FSEvents 2.5.1
pyobjc-framework-InputMethodKit 2.5.1
pyobjc-framework-InstallerPlugins 2.5.1
pyobjc-framework-InstantMessage 2.5.1
pyobjc-framework-LatentSemanticMapping 2.5.1
pyobjc-framework-LaunchServices 2.5.1
pyobjc-framework-Message 2.5.1
pyobjc-framework-OpenDirectory 2.5.1
pyobjc-framework-PreferencePanes 2.5.1
pyobjc-framework-PubSub 2.5.1
pyobjc-framework-QTKit 2.5.1
pyobjc-framework-Quartz 2.5.1
pyobjc-framework-ScreenSaver 2.5.1
pyobjc-framework-ScriptingBridge 2.5.1
pyobjc-framework-SearchKit 2.5.1
pyobjc-framework-ServiceManagement 2.5.1
pyobjc-framework-Social 2.5.1
pyobjc-framework-SyncServices 2.5.1
pyobjc-framework-SystemConfiguration 2.5.1
pyobjc-framework-WebKit 2.5.1
pyOpenSSL 0.13.1
pyparsing 2.0.1
python-dateutil 2.8.0
pytz 2013.7
PyYAML 5.1.1
pyzmq 18.0.1
scandir 1.10.0
scipy 1.2.2
setuptools 39.1.0
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.11.0
tb-nightly 1.14.0a20190614
tensorboard 1.11.0
tensorflow 1.11.0
tensorflow-estimator-2.0-preview 1.14.0.dev2019061821 tensorflow-hub 0.1.1
tensorflowjs 0.6.4
termcolor 1.1.0
tf-nightly-2.0-preview 2.0.0.dev20190605
tflearn 0.3.2
the 0.1.5
tornado 5.1.1
traitlets 4.3.2
wcwidth 0.1.7
Werkzeug 0.15.4
wheel 0.33.4
wrapt 1.11.2
xattr 0.6.4
zope.interface 4.1.1

swathiJaya commented 5 years ago

Thank you @BSudheerR