sethah / deeptennis Goto Github PK
View Code? Open in Web Editor NEWComputer vision and deep learning on tennis video
License: MIT License
Computer vision and deep learning on tennis video
License: MIT License
Is it possible to port this to python3?
i ran the demo in google colab and get the following error? would you please tell me, how can i fix it?
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/dist-packages/allencv/service/server_simple.py", line 36, in
from allennlp.common import JsonDict
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/init.py", line 1, in
from allennlp.common.from_params import FromParams
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/from_params.py", line 22, in
from allennlp.common.lazy import Lazy
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/lazy.py", line 5, in
from allennlp.common.params import Params
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/params.py", line 33, in
from allennlp.common.file_utils import cached_path
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/file_utils.py", line 78, in
class FileLock(_FileLock):
File "/usr/local/lib/python3.7/dist-packages/allennlp/common/file_utils.py", line 96, in FileLock
def acquire(self, timeout=None, poll_interval=0.05):
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 88, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 114, in _overrides
_validate_method(method, super_class, check_signature)
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 135, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "/usr/local/lib/python3.7/dist-packages/overrides/signature.py", line 95, in ensure_signature_is_compatible
super_sig, sub_sig, super_type_hints, sub_type_hints, is_static, method_name
File "/usr/local/lib/python3.7/dist-packages/overrides/signature.py", line 136, in ensure_all_kwargs_defined_in_sub
raise TypeError(f"{method_name}: {name}
is not present.")
TypeError: FileLock.acquire: poll_intervall
is not present.
Great job! Really nice work. I would also be interested in experimenting with video data.
Do you know a good data source?
when executing the example command
make data/interim/tracking_videos/federer_cilic_aus_18\
FPS=1\
VFRAMES=100\
MODEL_PATH=https://deeptennis.s3-us-west-1.amazonaws.com/player_kprcnn_res50_fpn.tar.gz
It gives back:
FileNotFoundError: file /home/sethah/ssd/deeptennis/models/tennis_rpn4 not found
Which seems to be a misconfiguration as this seems to be your personal file structure.
I get infos printed looking like
2020-03-12 18:34:22,525 - INFO - allennlp.common.from_params - instantiating class
<class 'allencv.models.object_detection.keypoint_rcnn.KeypointRCNN'> from params
{
'num_keypoints': 4,
'rpn': {
'archive_file': '/home/sethah/ssd/deeptennis/models/tennis_rpn4',
'requires_grad': True,
'type': 'pretrained_rpn'
},
'roi_keypoint_head': {
'feature_extractor': {
'activations': 'relu',
'hidden_channels': 512,
'input_channels': 256,
'num_layers': 5,
'type': 'feedforward'
}
},
'train_rpn': True,
'roi_box_head': {
'decoder_nms_thresh': 0.2,
'feature_extractor': {
'feedforward': {
'activations': 'relu',
'hidden_dims': [256, 256],
'input_dim': 12544,
'num_layers': 2
},
'input_channels': 256,
'input_height': 7,
'input_width': 7,
'type': 'flatten'
},
'decoder_thresh': 0.01
}
} and extras {'vocab'}
Maybe this will help you figuring this out.
i ran the demo in google colab and get the following error?
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/dist-packages/allencv/service/server_simple.py", line 30, in
from flask_cors import CORS
ModuleNotFoundError: No module named 'flask_cors'
would you please tell me, how can i fix it?
I get the following error when I try to analyze a screenshot from a tennis match.
python3 -m allencv.service.server_simple\
--archive-path "https://deeptennis.s3-us-west-1.amazonaws.com/player_kprcnn_res50_fpn.tar.gz"\
--predictor default_image\
--include-package allencv.data.dataset_readers\
--include-package allencv.modules.im2vec_encoders\
--include-package allencv.modules.im2im_encoders\
--include-package allencv.models\
--include-package allencv.predictors\
--title "Player detector"\
--detection\
--overrides '{"dataset_reader": {"type": "image_annotation", "augmentation": [{"type": "resize", "height": 720, "width": 1280}, {"type": "normalize"}], "lazy": true}, "model": {"roi_box_head": {"decoder_detections_per_image": 50}, "rpn": {"archive_file": "https://deeptennis.s3-us-west-1.amazonaws.com/player_rpn_res50_fpn.tar.gz"}}}'
Neither build_dir nor field_names passed. Demo won't render on this port.
You must use nodejs + react app to interact with the server.
Model loaded, serving demo on port 8000
127.0.0.1 - - [2020-03-11 17:55:39] "GET / HTTP/1.1" 200 12402 0.001025
[2020-03-11 17:55:39,405] ERROR in app: Exception on /predict [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/dist-packages/allencv/service/server_simple.py", line 141, in predict
decoded = base64.b64decode(data[23:])
File "/usr/lib/python3.6/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
127.0.0.1 - - [2020-03-11 17:55:39] "POST /predict HTTP/1.1" 500 477 0.009075```
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.