Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
camtron
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Automate
Agent sessions
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kr69sugu
camtron
Commits
615c7d77
Commit
615c7d77
authored
Mar 4, 2023
by
Andrews Sobral
Browse files
Options
Downloads
Patches
Plain Diff
Updated python demo script. Added virtualenv scripts for easy build and test the pybgs package.
parent
ad670019
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
demo2.py
+13
-13
13 additions, 13 deletions
demo2.py
virtualenv-build-test-publish.sh
+46
-0
46 additions, 0 deletions
virtualenv-build-test-publish.sh
virtualenv-install-test.sh
+30
-0
30 additions, 0 deletions
virtualenv-install-test.sh
with
91 additions
and
13 deletions
.gitignore
+
2
−
0
View file @
615c7d77
...
...
@@ -30,3 +30,5 @@ bgslibrary_gui
upload.sh
*.code-workspace
env
bgslibrary_env
bgslibrary_test_env
This diff is collapsed.
Click to expand it.
demo2.py
+
13
−
13
View file @
615c7d77
...
...
@@ -45,13 +45,23 @@ algorithms.append(bgs.PAWCS())
algorithms
.
append
(
bgs
.
TwoPoints
())
algorithms
.
append
(
bgs
.
ViBe
())
algorithms
.
append
(
bgs
.
CodeBook
())
algorithms
.
append
(
bgs
.
FuzzySugenoIntegral
())
algorithms
.
append
(
bgs
.
FuzzyChoquetIntegral
())
algorithms
.
append
(
bgs
.
LBSimpleGaussian
())
algorithms
.
append
(
bgs
.
LBFuzzyGaussian
())
algorithms
.
append
(
bgs
.
LBMixtureOfGaussians
())
algorithms
.
append
(
bgs
.
LBAdaptiveSOM
())
algorithms
.
append
(
bgs
.
LBFuzzyAdaptiveSOM
())
algorithms
.
append
(
bgs
.
VuMeter
())
algorithms
.
append
(
bgs
.
KDE
())
algorithms
.
append
(
bgs
.
IndependentMultimodal
())
if
is_cv2
():
algorithms
.
append
(
bgs
.
MixtureOfGaussianV1
())
# if opencv 2.x
algorithms
.
append
(
bgs
.
GMG
())
# if opencv 2.x
if
is_cv
3
():
algorithms
.
append
(
bgs
.
KNN
())
# if opencv
3.x
if
not
is_cv
2
():
algorithms
.
append
(
bgs
.
KNN
())
# if opencv
> 2
if
is_cv2
()
or
is_cv3
():
algorithms
.
append
(
bgs
.
DPAdaptiveMedian
())
...
...
@@ -66,16 +76,6 @@ if is_cv2() or is_cv3():
algorithms
.
append
(
bgs
.
T2FGMM_UV
())
algorithms
.
append
(
bgs
.
T2FMRF_UM
())
algorithms
.
append
(
bgs
.
T2FMRF_UV
())
algorithms
.
append
(
bgs
.
FuzzySugenoIntegral
())
algorithms
.
append
(
bgs
.
FuzzyChoquetIntegral
())
algorithms
.
append
(
bgs
.
LBSimpleGaussian
())
algorithms
.
append
(
bgs
.
LBFuzzyGaussian
())
algorithms
.
append
(
bgs
.
LBMixtureOfGaussians
())
algorithms
.
append
(
bgs
.
LBAdaptiveSOM
())
algorithms
.
append
(
bgs
.
LBFuzzyAdaptiveSOM
())
algorithms
.
append
(
bgs
.
VuMeter
())
algorithms
.
append
(
bgs
.
KDE
())
algorithms
.
append
(
bgs
.
IndependentMultimodal
())
algorithms
.
append
(
bgs
.
MultiCue
())
if
is_cv2
()
or
is_lower_or_equals_cv347
():
...
...
@@ -93,7 +93,7 @@ if (len(sys.argv) == 2):
video_file
=
"
dataset/video.avi
"
print
(
"
Number of available algorithms:
"
,
len
(
algorithms
))
for
algorithm
in
algorithms
:
print
(
"
Running
"
,
algorithm
.
__class__
)
...
...
This diff is collapsed.
Click to expand it.
virtualenv-build-test-publish.sh
0 → 100644
+
46
−
0
View file @
615c7d77
# Remove the existing virtual environment if it exists
rm
-rf
bgslibrary_env
# Create a new virtual environment called bgslibrary_env using Python3
python3
-m
venv bgslibrary_env
# Activate the newly created virtual environment
source
bgslibrary_env/bin/activate
# Upgrade pip and install required packages numpy and OpenCV
python
-m
pip
install
--upgrade
pip
python
-m
pip
install
wheel
python
-m
pip
install
numpy
python
-m
pip
install
opencv-python
# Build and install the package using the setup.py script
python setup.py build
python setup.py
install
# Set the PYTHONPATH environment variable to the build directory to access the installed library
# The following line is for Linux
export
PYTHONPATH
=
$PYTHONPATH
:
$PWD
/build/lib.linux-x86_64-cpython-38
# The following line is for Mac
export
PYTHONPATH
=
$PYTHONPATH
:
$PWD
/build/lib.macosx-11-x86_64-cpython-39
# Run demo.py and demo2.py to verify the package installation
python demo.py
python demo2.py
# Install the Twine package for uploading the distribution packages
python
-m
pip
install
twine
# Remove any existing build directory
rm
-rf
build/
*
# Build a Wheel distribution package for the project
python setup.py bdist_wheel
# Upload any generated Wheel distribution packages using Twine
twine upload dist/
*
.whl
# Create a source distribution package for the project
python setup.py sdist
# Upload the generated source distribution package using Twine
twine upload dist/pybgs-
*
.tar.gz
This diff is collapsed.
Click to expand it.
virtualenv-install-test.sh
0 → 100644
+
30
−
0
View file @
615c7d77
# Remove the existing virtual environment if it exists
rm
-rf
bgslibrary_test_env
# Create a new virtual environment called bgslibrary_test_env using Python3
python3
-m
venv bgslibrary_test_env
# Activate the newly created virtual environment
source
bgslibrary_test_env/bin/activate
# Upgrade pip and install required packages numpy and OpenCV
python
-m
pip
install
--upgrade
pip
python
-m
pip
install
numpy
python
-m
pip
install
opencv-python
# Build and install the package using the setup.py script
# python setup.py build
# python setup.py install
# Set the PYTHONPATH environment variable to the build directory to access the installed library
# The following line is for Linux
# export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.linux-x86_64-cpython-38
# The following line is for Mac
# export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.macosx-11-x86_64-cpython-39
# Install the pybgs directly from PyPI
python
-m
pip
install
pybgs
# Run demo.py and demo2.py to verify the package installation
python demo.py
python demo2.py
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment