Code Monkey home page Code Monkey logo

deeptennis's People

Contributors

seth-stripe avatar sethah avatar

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

Watchers

 avatar  avatar

deeptennis's Issues

python3

Is it possible to port this to python3?

Error: FileLock.acquire: `poll_intervall` is not present.

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.

Dataset

Great job! Really nice work. I would also be interested in experimenting with video data.
Do you know a good data source?

missing model

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.

Error: flask_cors

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?

Incorrect padding

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

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.