Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]

# CI installs only the classical dependency group. Torch/YOLO/XFeat testing
# will land as a separate, non-blocking job once dependency weight and model
# availability are settled.

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
pip install -r requirements-classical.txt
pip install ruff black

- name: Lint (ruff)
run: ruff check .

- name: Format check (black)
run: black --check .

test-classical:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install system deps (OpenCV)
run: sudo apt-get install -y libgl1

- name: Install dependencies
run: |
pip install -r requirements-classical.txt
pip install -e .

- name: Build Cython extension
run: |
cd perception/tasks/segmentation/saliency_detection
python setup.py build_ext --inplace

- name: Run tests
run: pytest -v --tb=short
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Code Quality [![CodeFactor](https://www.codefactor.io/repository/github/berkeley

## Installation

We will use Conda for managing environments. We recommend installing Miniconda for Python 3.8 [here](https://docs.conda.io/en/latest/miniconda.html).
We will use Conda for managing environments. We recommend installing Miniconda for Python 3.11 [here](https://docs.conda.io/en/latest/miniconda.html).
Python 3.11 is required to support YOLO models.
Then create an environment with

conda create -n urobotics python=3.8
conda create -n urobotics python=3.11

activate it with

Expand All @@ -22,9 +23,13 @@ Change into the cloned repo directory and install it
pip3 install -e ./


Install all dependencies with
Install dependencies with

pip3 install -r requirements.txt
pip3 install -r requirements-classical.txt

If you also need YOLO/torch-based models, install the torch group instead (it includes everything in `requirements-classical.txt`, plus `torch`, `torchvision`, and `ultralytics`)

pip3 install -r requirements-torch.txt


Also, our training data is stored here https://www.dropbox.com/sh/rrbfqfutrmifrxs/AAAfXxlcCtWZmUELp4wXyTIxa?dl=0 so download it and unzip it in the same folder as `perception`.
Expand Down
10 changes: 10 additions & 0 deletions requirements-classical.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
numpy==2.3.0
opencv-python==4.11.0.86
scipy==1.17.1
matplotlib==3.11.1
imageio==2.37.4
imageio-ffmpeg==0.6.0
Cython==3.2.8
scikit-image==0.26.0
shapely==2.1.2
pytest==9.1.1
4 changes: 4 additions & 0 deletions requirements-torch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements-classical.txt
torch==2.13.0
torchvision==0.28.0
ultralytics==8.4.104
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
python_requires='>=3.7',
python_requires='>=3.11',
)
Loading