Git Product home page Git Product logo

tensorpy's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorpy's Issues

Out-of-date

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.

`classify` command downloads to a .png and then fails to convert the image

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.)

Setup steps for iMac with Anaconda Python 2.7

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

Crashes when identifying a large # of images in bulk

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.

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.