Skip to content

Commit

Permalink
feat: add support for different models
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed Sep 6, 2024
1 parent 7902968 commit 53743ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Dockerfile*
*.md
bin/
src/submodules
.github/
.gitmodules
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ================================================================
# Docker image for fastapi-vss
# ================================================================
FROM mbari/aidata:1.17.0
FROM mbari/aidata:1.18.0

LABEL vendor="MBARI"
LABEL maintainer="dcline@mbari.org"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cuda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ================================================================
# Docker image for fastapi-vss (CUDA enabled)
# ================================================================
FROM mbari/aidata:1.17.0-cuda124
FROM mbari/aidata:1.18.0-cuda124

LABEL vendor="MBARI"
LABEL maintainer="dcline@mbari.org"
Expand Down
3 changes: 2 additions & 1 deletion src/app/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ def init_config() -> dict:
info(data)
redis_host = data['redis']['host']
redis_port = data['redis']['port']
model = data['vs']['model']
password = os.getenv("REDIS_PASSWD")

info(f"Connecting to redis at {redis_host}:{redis_port}")
r = redis.Redis(host=redis_host, port=redis_port, password=password)
v = ViTWrapper(r, "cpu", False, BATCH_SIZE)
v = ViTWrapper(r, device="cpu", model_name=model, reset=False, batch_size=BATCH_SIZE)

project = data['tator']['project']

Expand Down
3 changes: 2 additions & 1 deletion src/app/project/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ sdcat:

vss:
project: "cfe"
threshold: 0.4
threshold: 0.9
model: "google/vit-base-patch16-224"

tator:
project: "902111-CFE"
Expand Down

0 comments on commit 53743ff

Please sign in to comment.