Skip to content

Commit

Permalink
Prerelease bugfixes (#191)
Browse files Browse the repository at this point in the history
* Fix LD_LIBRARY_PATH

* Typo fix

* Install usb cam deps

* Update README.MD

* Update demo setup

Co-authored-by: Illia Oleksiienko <io@ece.au.dk>
  • Loading branch information
passalis and iliiliiliili authored Dec 27, 2021
1 parent 236fd3a commit 83989cd
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bin/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export OPENDR_HOME=$PWD
export PYTHONPATH=$OPENDR_HOME/src:$PYTHONPATH
export PYTHON=python3
export LD_LIBRARY_PATH=$OPENDR_HOME/src:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$OPENDR_HOME/lib:$LD_LIBRARY_PATH

if [[ -z "${OPENDR_DEVICE}" ]]; then
echo "[INFO] Set available device to CPU. You can manually change this by running 'export OPENDR_DEVICE=gpu'."
Expand Down
3 changes: 2 additions & 1 deletion projects/opendr_ws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ For running a minimal working example you can follow the instructions below:
```source /opt/ros/noetic/setup.bash```

1. Make sure you are inside opendr_ws
2. If you are planning to use a usb camera for the demos, install the corresponding package:
2. If you are planning to use a usb camera for the demos, install the corresponding package and its dependencies:

```shell
cd src
git clone https://github.com/ros-drivers/usb_cam
cd ..
rosdep install --from-paths src/ --ignore-src
```
3. Install the following dependencies, required in order to use the OpenDR ROS tools:
```shell
Expand Down
13 changes: 8 additions & 5 deletions projects/perception/heart_anomaly_detection/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ python3 demo.py -model [anbof|gru]
By setting ` --input_data /path/to/data.npy` inference can be performed from a single ECG sequence.

Additional parameters can be specified to control the model and data parameters:
` --attention_type` sets the attention type for ANBOF model
` --checkpoint` defines the path to a pretrained model (AF-pretrained temporal ANBOF or GRU will be downloaded by default, otherwise a path to existing checkpoint should be specified)
` --channels` defines the number of channels in input sequence
` --series_length` defines the length of input sequence
` --n_class` defines the number of classes

- ` --attention_type` sets the attention type for ANBOF model
- ` --checkpoint` defines the path to a pretrained model (AF-pretrained temporal ANBOF or GRU will be downloaded by default, otherwise a path to existing checkpoint should be specified)
- ` --channels` defines the number of channels in input sequence
- ` --series_length` defines the length of input sequence
- ` --n_class` defines the number of classes

If you switch between the two available models (ANBOF and GRU) without specifying the checkpoint folder, please make sure that you delete the previous model files (e.g., `rf -rf checkpoint`).

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2020-2021 OpenDR European Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from setuptools import find_packages, setup


def from_file(file_name: str = "requirements.txt", comment_char: str = "#"):
"""Load requirements from a file"""
with open(file_name, "r") as file:
lines = [ln.strip() for ln in file.readlines()]
reqs = []
for ln in lines:
# filer all comments
if comment_char in ln:
ln = ln[: ln.index(comment_char)].strip()
# skip directly installed dependencies
if ln.startswith("http"):
continue
if ln: # if requirement is not empty
reqs.append(ln)
return reqs


def long_description():
text = open("README.md", encoding="utf-8").read()
# SVG images are not readable on PyPI, so replace them with PNG
text = text.replace(".svg", ".png")
return text


setup(
name="object_detection_3d_demo",
version="0.1.0",
description="Example of in-browser video streaming and processing using the OpenDR toolkit.",
long_description=long_description(),
long_description_content_type="text/markdown",
author="Illia Oleksiienko, Lukas Hedegaard",
author_email="{io, lhm}@ece.au.dk",
install_requires=from_file("requirements.txt"),
packages=find_packages(exclude=["test"]),
keywords=["deep learning", "pytorch", "AI", "OpenDR", "lidar"],
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
flask
# black
# isort>=5.7
# flake8-black
numpy
opencv-contrib-python
imutils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ def long_description():


setup(
name="online_activity_recognition",
name="object_tracking_2d_demo",
version="0.1.0",
description="Example of in-browser video streaming and processing using the OpenDR toolkit.",
long_description=long_description(),
long_description_content_type="text/markdown",
author="Lukas Hedegaard",
author_email="lhm@ece.au.dk",
author="Illia Oleksiienko, Lukas Hedegaard",
author_email="{io, lhm}@ece.au.dk",
install_requires=from_file("requirements.txt"),
packages=find_packages(exclude=["test"]),
keywords=["deep learning", "pytorch", "AI", "OpenDR", "video", "webcam"],
Expand Down
2 changes: 1 addition & 1 deletion src/c_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In order to build the library you should:
1. Build the OpenDR C API library

```sh
make liboperdr
make libopendr
```

After building the API you will find the library (`libopendr.so`) under the `lib` folder.
Expand Down

0 comments on commit 83989cd

Please sign in to comment.