Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Repository
a wrapper of DeepLabCut for its ease of use.
Basic Info
- Host: GitHub
- Owner: gwappa
- License: mit
- Language: Python
- Default Branch: master
- Size: 17.6 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
python-dlclib
A wrapper of DeepLabCut for its ease of use.
dlclib is supposed to work with almost all single-camera setups of all DLC versions.
Installation
It is better building your DeepLabCut environment first, before running:
bash
$ pip install dlclib
Classes
dlclib.estimate.TFSession
A thin wrapper over the DeepLabCut inference network based on TensorFlow.
session = TFSession.from_config(cfg)will return aTFSessionobject using the specifiedconfig.yamlfile of the DeepLabCut project.session.get_pose(image)will return anumpy.ndarraycorresponding to the estimation. for a batch-processing network, use a list of images, or a 4-D uint8 array whose axis 0 correspond to indexes of images.session.open_writer(path)opens a CSVWriter at the specified path (see below).
dlclib.posture.PostureMapper
A utility class that maps the output of TFSession to a dictionary.
Note that the current implementation:
- does not care anything about conversion speed.
currently only supports non-batch models.
mapper = PostureMapper.from_config(cfg)will return aPostureMapperobject using the specifiedconfig.yamlfile of the DeepLabCut project.posedict = mapper.map(pose)receives the output ofTFSession.get_pose(), and returns a dictionary.posedict[part]is a named tuple that hasx,yandprobattributes.
dlclib.writer.CSVWriter
A simple class for writing the estimation into a CSV file. This class does support batch-processing networks.
writer = session.open_writer(path)from aTFSessionobject initializes the writer associated with the inference session.- For every video frame, you can call
writer.push(frame). It automatically callsTFSession.get_pose()internally, and writes its outputs into the file. - Calling
writer.flush()will flush the pended video frames (in case of batch modes; it does not wait for more frames and runsget_pose()to writes the estimation). - Calling
writer.close()will flush its internal buffer, close the file and invalidates itself. You can keep using the originatingTFSessionobject.
This class supports the context-manager model, so you can write:
python
with session.open_writer(path) as out:
for frame in video_frames:
out.push(frame)
License
2020-2021 Keisuke Sehara, the MIT License
You can cite dlclib by using the DOI: https://doi.org/10.5281/zenodo.4459238
Owner
- Name: Keisuke Sehara
- Login: gwappa
- Kind: user
- Location: Tokyo, Japan
- Repositories: 7
- Profile: https://github.com/gwappa
a hard-core N.E.E.T. with some coding capabilities (C/C++, Java, Python, Rust) interested in automating chores without paying royalty.
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Keisuke Sehara | k****a@g****m | 10 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- gwappa (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 5 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
- Total maintainers: 1
pypi.org: dlclib
a wrapper of DeepLabCut for its ease of use.
- Homepage: https://github.com/gwappa/python-dlclib
- Documentation: https://dlclib.readthedocs.io/
- License: MIT
-
Latest release: 1.1.0
published about 5 years ago
Rankings
Maintainers (1)
Dependencies
- deeplabcut *