Skip to content

Commit

Permalink
Merge pull request #66 from LukasBommes/add_pypi_readme
Browse files Browse the repository at this point in the history
add pypi readme
  • Loading branch information
LukasBommes authored Oct 31, 2024
2 parents cb8e08f + ec74e32 commit 7f6744d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/opencv/build/lib"

WORKDIR /home/video_cap

COPY pyproject.toml /home/video_cap
COPY setup.py /home/video_cap
COPY pyproject.toml /home/video_cap/
COPY setup.py /home/video_cap/
COPY src /home/video_cap/src/
COPY README.md /home/video_cap/

# Install Python package
RUN python3.12 -m pip install .
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<h1 align="center">
<a href="https://github.com/LukasBommes/mv-extractor" target="blank_">
<img width="250" alt="mvextractor" src="logo.svg" />
<img width="250" alt="mvextractor" src="https://raw.githubusercontent.com/LukasBommes/mv-extractor/cb8e08f4c1e161d103d5382ded93134f26e96f05/logo.svg" />
</a>
<br>
Motion Vector Extractor
Expand All @@ -19,9 +19,9 @@ These additional features enable further projects, such as fast visual object tr

The image below shows a video frame with extracted motion vectors overlaid.

![motion_vector_demo_image](mvs.png)
![motion_vector_demo_image](https://raw.githubusercontent.com/LukasBommes/mv-extractor/cb8e08f4c1e161d103d5382ded93134f26e96f05/mvs.png)

A usage example can be found in `extract_mvs.py`.
A usage example can be found [here](https://github.com/LukasBommes/mv-extractor/blob/add_pypi_readme/src/mvextractor/__main__.py).


## News
Expand Down Expand Up @@ -50,7 +50,7 @@ Note, that we currently provide the package only for x86-64 linux, such as Ubunt

### Step 2: Extract Motion Vectors

Download the example video `vid_h264.mp4` from the repo and place it somewhere. To extract the motion vectors, open a terminal at the same location and run
Download the example video [`vid_h264.mp4`](https://github.com/LukasBommes/mv-extractor/blob/master/vid_h264.mp4) from the repo and place it somewhere. To extract the motion vectors, open a terminal at the same location and run
```
extract_mvs vid_h264.mp4 --preview --verbose
```
Expand Down Expand Up @@ -242,7 +242,7 @@ It is based on [MV-Tractus](https://github.com/jishnujayakumar/MV-Tractus/tree/m

#### License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](https://github.com/LukasBommes/mv-extractor/blob/master/LICENSE) file for details.


#### Citation
Expand Down
2 changes: 1 addition & 1 deletion dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For more details on the usage see the [project homepage](https://github.com/Luka

## About

This software is written by **Dr.-Ing. Lukas Bommes** and licensed under the [MIT License](https://github.com/LukasBommes/mv-extractor/blob/master/LICENSE).
This software is written by [**Lukas Bommes**](https://lukasbommes.de/) and licensed under the [MIT License](https://github.com/LukasBommes/mv-extractor/blob/master/LICENSE).

If you use the project for academic research please cite

Expand Down
17 changes: 10 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from setuptools import find_packages, setup, Extension
import pkgconfig
from pathlib import Path
import numpy as np


d = pkgconfig.parse('libavformat libswscale opencv4')
pkgconfig_result = pkgconfig.parse('libavformat libswscale opencv4')

print("Numpy dir: ", np.get_include())

mvextractor = Extension('mvextractor.videocap',
include_dirs = [
*d['include_dirs'],
*pkgconfig_result['include_dirs'],
np.get_include()
],
library_dirs = d['library_dirs'],
libraries = d['libraries'],
library_dirs = pkgconfig_result['library_dirs'],
libraries = pkgconfig_result['libraries'],
sources = [
'src/mvextractor/py_video_cap.cpp',
'src/mvextractor/video_cap.cpp',
Expand All @@ -31,6 +32,8 @@
license='MIT',
url='https://github.com/LukasBommes/mv-extractor',
description=('Reads video frames and MPEG-4/H.264 motion vectors.'),
long_description=(Path(__file__).parent / "README.md").read_text(),
long_description_content_type='text/markdown',
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand Down Expand Up @@ -59,9 +62,9 @@
packages=find_packages(where='src'),
package_dir={'': 'src'},
entry_points={
'console_scripts': [
'extract_mvs=mvextractor.__main__:main',
],
'console_scripts': [
'extract_mvs=mvextractor.__main__:main',
],
},
python_requires='>=3.9, <4',
# minimum versions of numpy and opencv are the oldest versions
Expand Down

0 comments on commit 7f6744d

Please sign in to comment.