tensorpy / tensorpy Goto Github PK
View Code? Open in Web Editor NEWEasy Image Classification with TensorFlow
Home Page: http://tensorpy.com
License: MIT License
Easy Image Classification with TensorFlow
Home Page: http://tensorpy.com
License: MIT License
I've left this project alone for awhile and several requirements are now out-of-data. I need to refresh this project when I have some spare time to get it working again.
how can i train custom images and detect them?
For any URL I have tried so far, I get the following outcome:
$ classify 'http://www.kitchengoodies.ca/uploads/ecom/fullsize/Lecreuset%20Stainless%20Kettle.jpg'
Traceback (most recent call last):
File "/usr/local/bin/classify", line 11, in <module>
load_entry_point('tensorpy==1.0.17', 'console_scripts', 'classify')()
File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/classify.py", line 91, in main
File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/image_base.py", line 90, in classify_image_url
File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/image_base.py", line 31, in convert_image_file_to_jpg
Exception: Cannot convert downloads_folder/temp_image_c614d6edb49b4cbe995bbf71bca1c780.png to jpg!
The comedy gold here is that the image was already a JPG, but somehow classify has saved it in a file ending in '.png', and is now wondering why it fails to convert this to JPEG. ๐คฃ
(The classify_image.py
script which operates on local files works totally fine, of course.)
Hi
I use Anaconda Python 2.7 on my iMac, I can create virtual environment "tensorpy" with Conda, but not sure if I can follow your setup steps to install tensorpy, especially the install.sh
Thanks
How do I detect objects in realtime using webcam?
Can anyone tell me what classes are present in this model and the accuracy .
I'm not sure if this is a problem with TesnorPy, Tensorflow, or the Windows 10 Linux Subsystem, but I've created the following script to bulk classify images in a directory and then output a dictionary indicating the # of times each classification is found. Here's my code:
from tensorpy import classify_image
from path import Path as path
from tensorflow.python.framework.errors_impl import InvalidArgumentError
def dir_classify(dirstr):
mydir = path(dirstr)
classes = {}
for f in mydir.files():
try:
guess = classify_image.external_run(f)
if guess in classes:
classes[guess] += 1
else:
classes[guess] = 1
except InvalidArgumentError:
pass
return classes
Note you need to install path.py to run this:
pip install path.py
Here's the info on my environment:
Python version: 2.7.13 (Anaconda 4.3.1)
OS: Windows 10 (but running the Linux Subsystem)
To reproduce this error, run the above like the following:
dir_classify("/mnt/c/pictures")
(Assuming you've got a bunch of pictures in c:\pictures)
When I run this on a Windows machine using the Linux Subsystem, it freezes my entire machine. The screen turns off and my machine stops responding to any keyboard or mouse input.
I then tried running it on a native Linux installation (Linux Mint 18.1 to be precise) and it doesn't completely freeze my computer but it exists with the error "Killed".. it doesn't even throw an exception, just throws you out of Python.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.