-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from LemurPwned/clip
0.6.0 - Guided video sampling
- Loading branch information
Showing
34 changed files
with
938 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: 🐛 Bug report | ||
about: If something isn't working 🔧 | ||
title: '' | ||
labels: bug | ||
assignees: | ||
--- | ||
|
||
## 🐛 Bug Report | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
## 🔬 How To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. ... | ||
|
||
### Code sample | ||
|
||
<!-- If applicable, attach a minimal code sample to reproduce the decried issue. --> | ||
|
||
### Environment | ||
|
||
* OS: [e.g. Linux / Windows / macOS] | ||
* Python version, get it with: | ||
|
||
```bash | ||
python --version | ||
``` | ||
|
||
### Screenshots | ||
|
||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
## 📈 Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## 📎 Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Configuration: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository | ||
|
||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: 🚀 Feature request | ||
about: Suggest an idea for this project 🏖 | ||
title: '' | ||
labels: enhancement | ||
assignees: | ||
--- | ||
|
||
## 🚀 Feature Request | ||
|
||
<!-- A clear and concise description of the feature proposal. --> | ||
|
||
## 🔈 Motivation | ||
|
||
<!-- Please describe the motivation for this proposal. --> | ||
|
||
## 🛰 Alternatives | ||
|
||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
## 📎 Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: ❓ Question | ||
about: Ask a question about this project 🎓 | ||
title: '' | ||
labels: question | ||
assignees: | ||
--- | ||
|
||
## Checklist | ||
|
||
<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) --> | ||
|
||
- [ ] I've searched the project's [`issues`](https://github.com/LemurPwned/video-sampler/issues). | ||
|
||
## ❓ Question | ||
|
||
<!-- What is your question --> | ||
|
||
How can I [...]? | ||
|
||
Is it possible to [...]? | ||
|
||
## 📎 Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release to PyPI | ||
|
||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: [master] | ||
workflow_dispatch: | ||
inputs: | ||
dry-run: | ||
required: true | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2.2.2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flit | ||
flit install --deps production | ||
- name: Configure test pypi | ||
run: | | ||
flit publish --repository testpypi | ||
- name: Build | ||
run: | | ||
flit build | ||
flit publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login to GH container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
- name: Build and push | ||
run: | | ||
docker build . --tag ghcr.io/lemurpwned/video-sampler:latest | ||
docker push ghcr.io/lemurpwned/video-sampler:latest | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Test sampling code | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
python -m pip install -e .[dev,test,clip] | ||
- name: Test with pytest | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Changelog | ||
|
||
## Description | ||
|
||
Changelog for the `video-sampler`. | ||
|
||
### 0.6.0 | ||
|
||
- adding CLIP-based gating for sampling | ||
- added docker build image | ||
- fixed some bugs in requirements and setup scripts | ||
- adding gif creation from sampled frames | ||
- added a notebook in `notebooks` to show the distribution shift of the sampled frames | ||
- added some basic tests (really basic) | ||
- added a short explanation and usage of guided sampling in README.md. | ||
- added grid hash sampling | ||
|
||
### 0.5.0 | ||
|
||
- fixed a major bug in the hashing buffer | ||
- added entropy and gzip methods for the sliding top-k buffer | ||
- improved build process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.11 | ||
|
||
# let's copy all the necessary files | ||
# we install our only 2 dependencies :) and vim for nice workflow | ||
RUN apt-get update && \ | ||
apt-get install -y vim | ||
RUN python3 -m pip install --upgrade pip | ||
WORKDIR /scratch | ||
RUN git clone https://github.com/LemurPwned/video-sampler.git && \ | ||
cd video-sampler && \ | ||
python3 -m pip install . | ||
WORKDIR /app | ||
RUN video_sampler --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.