cloud-cv / py-cloudcv Goto Github PK
View Code? Open in Web Editor NEWPython APIs for CloudCV
Home Page: cloudcv.org
Python APIs for CloudCV
Home Page: cloudcv.org
win xp python 2.7 using ipython
pip install pcloudcv
get .json config from here
https://github.com/batra-mlp-lab/pcloudcv/blob/master/pcloudcv/config.json
from pcloudcv import PCloudCV
list= ['C:\test', 'C:\test', 'ImageStitch']
pcv = PCloudCV('C:/test/config.json', list)
pcv.run()
get error
ConnectionError Traceback (most recent call last)
in ()
----> 1 pcv.run()
C:\Python27\lib\site-packages\pcloudcv\pcloudcv.pyc in run(self)
19
20 def run(self):
---> 21 ud = UploadData(self.config_obj)
22 ud.start()
23 log('I','Starting Uploading Data')
C:\Python27\lib\site-packages\pcloudcv\uploadData.pyc in init(self, config_p
arser)
31 self._redis_obj = redis.StrictRedis(host='localhost', port=6379,
db=0)
32 self._pubsub = self._redis_obj.pubsub()
---> 33 self._pubsub.subscribe('intercomm')
34
35 redisThread = RedisListenForPostThread(self._pubsub, self._redis
_obj)
C:\Python27\lib\site-packages\redis\client.pyc in subscribe(self, channels)
1850 for channel in channels:
1851 self.channels.add(channel)
-> 1852 return self.execute_command('SUBSCRIBE', *channels)
1853
1854 def unsubscribe(self, channels=[]):
C:\Python27\lib\site-packages\redis\client.pyc in execute_command(self, *args, *
*kwargs)
1802 # Connect manually here. If the Redis server is down, this w
ill
1803 # fail and raise a ConnectionError as desired.
-> 1804 connection.connect()
1805 # resubscribe to all channels and patterns before
1806 # resending the current command
C:\Python27\lib\site-packages\redis\connection.pyc in connect(self)
251 except socket.error:
252 e = sys.exc_info()[1]
--> 253 raise ConnectionError(self._error_message(e))
254
255 self._sock = sock
ConnectionError: Error 10061 connecting localhost:6379. ╧юфъы■ўхэшх эх єёЄрэютых
эю,.
Traceback (most recent call last):
File "./app/views.py", line 313, in matlabReadRequest
response = saveFilesAndProcess(request, job_obj)
File "./app/savefile.py", line 88, in saveFilesAndProcess
os.mkdir(job_obj.storage_path)
OSError: [Errno 2] No such file or directory: '/srv/share/cloudcv/jobs/d2ec6786-d42e-11e4-b35f-22000aef83c4/'
The link of screenshot image(http://godel.ece.vt.edu/cloudcv/fileupload/media/pictures/output_new.gif) provided in README.md is showing 500 Internal server error.
The server raises the following error:
Traceback (most recent call last): File "/home/ubuntu/cloudcv/cloudcv17/app/celery/web_tasks/ImageStitchingTask.py", line 25, in runImageStitching popen = subprocess.Popen(list,stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
The file config.json is missing and referred to the following link :
https://github.com/batra-mlp-lab/pcloudcv/blob/master/pcloudcv/config.json
The edits need to be made in the following :
Update the link with example file and the documentation for same.
Hi,
When I run python run.py config.json -I "/full/path/input/file" -O "/full/path/output/" -E "features", I get the following errors:
{
"exec": "features",
"maxim": 500,
"config": [
{
"name": "ImageStitch",
"path": "local: /home/sash/Pictures/index.jpeg",
"output": "dropbox:/1/",
"params": {
"warp": "plane"
}
},
{
"name": "VOCRelease5",
"path": "local: /home/sash/Pictures/index.jpeg",
"output": "dropbox:/1/",
"params": {
"Models": "PAS_bicycle, PAS_aeroplane, PAS_bird, PAS_boat, PAS_bottle, PAS_bus, PAS_car,PAS_cat,PAS_chair,PAS_cow,PAS_diningtable,PAS_dog,PAS_horse,PAS_motorbike,PAS_person,PAS_pottedplant,PAS_sheep,PAS_sofa,PAS_train,PAS_tvmonitor"
}
},
{
"name": "classify",
"path": "local: local: /home/sash/Pictures/index.jpeg",
"output": "dropbox:/3/",
"params": {
}
},
{
"name": "features",
"path": "local: /home/sash/Pictures/index.jpeg",
"output": "dropbox:/1/",
"params": {
"name": "decaf",
"verbose": "2",
"server": "decaf_server"
}
}
]
}
Instead of logging in the console using print
. Shouldn't we use logging.info. We python default logging module for the API
Hi
I want to setup python cloud on multiple ubuntu machines and distribute my application works .
can you please let me know the setup steps ?
and is python cloud works similar to other open source cluster computing frameworks like Apache spark and flink ?
Regards
Prateek
I'm trying to run an application modeled after the python script in the tutorial. Code is below:
from pcloudcv import PCloudCV
config_dict = {'input':'/home/katie/images','output':'/home/katie/output','exec':'VOCRelease5'}
path_to_config_file = '/home/katie/pcloudcv/pcloudcv/config.json'
login_required = True
pcv = PCloudCV(path_to_config_file, config_dict, login_required)
pcv.start()
config file looks like this:
{
"exec": "VOCRelease5",
"maxim": 500,
"config": [
{
"name": "VOCRelease5",
"path": "local: /home/katie/images",
"output": "/home/katie/output",
"params": {
"Models": "all"
}
}
]
}
When I run the script, I receive what is pasted below, and it just gets stuck there. Any direction on how to fix this? I honestly am not sure what is supposed to happen because the screenshots are broken images, so that could also be a good starting point.
Added Path: /home/katie/pcloudcv/pcloudcv
CherryPy Checker:
The Application mounted at '' has an empty config.Starting Listening to Redis Channel for HTTP Post Requests
Listening to Redis Channel
After a "object-detection" request to the API I get back this error message:
File "/home/ubuntu/cloudcv/cloudcv17/app/celery/api_tasks/tasks.py", line 313, in run
output = run_matlab_code(mlab_obj, '/var/www/html/cloudcv/voc-dpm-matlab-bridge/pascal_object_detection.m', list, parsed_dict['socketid'])
NameError: global name 'mlab_obj' is not defined
I would suggest getting rid of the config.json file as well as reliance on directories full of images. It seems to me that the config file can simply be replaced by functional interface. Also, I don't think the arguments to those function should be directories. The API should not care where image data is retrieved from.
I think a more intuitive and generic API would look something like.
img1 = open("/path/to/file.jpg")
img2 = open("/path/to/file2.jpg")
c = PCloudCv()
c.stitch(img1,img2, callback=onCompletion)
c.detect(img1,callback=onCompletion)
Generally, what I am suggesting is that the API use functions, that take python object and return python objects.
Also you might consider looking at picloud, to see how their python API works with async jobs http://docs.picloud.com/primer.html#creating-a-job-from-python .
Steps to reproduce:
Change the dropbox location in the given config file.
Config file contents:
{
"exec" : "VOCRelease5",
"maxim" : 500,
"config":
[
{
"name": "VOCRelease5",
"path": "dropbox:/people",
"output": "/media/Media1/people_annotated",
"params": {"Models": "PAS_person"}
}
]
}
Log:
Added Path: /home/vt/pcloudcv/pcloudcv
{}
/home/vt/pcloudcv/pcloudcv/config.cfg
f25c2494-c115-11e3-bd1c-000af728c4b2
User Authenticated
Welcome
DropBox Authentication Successful
/home/vt/pcloudcv/pcloudcv/config.cfg
f25c2494-c115-11e3-bd1c-000af728c4b2
User Authenticated
Welcome
Starting Listening to Redis Channel for HTTP Post Requests
Listening to Redis Channel
Starting Socket Connection Thread
Starting Post Request
Source Path: dropbox:/people
Executable: VOCRelease5
Executable Params: {u'Models': u'PAS_person'}
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
Waiting for Socket Connection to complete
'NoneType' object has no attribute 'emit'
You pressed Ctrl+C! Exiting Now
Local Server Stopped
Is there a reason why the pcloudcv
package, pcloudcv
module and PCloudCV
class are prefixed with a p
?
cloudcv
alone does not clash with any other packages on PyPI or GitHub as far as I can tell.
Presently 8000 port is being used. Many primary webservers run on 8000. We need a random port for oAuth2 Authentication.
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.