Distinguish behavioral clusters Toolbox
Project description
CASTLE
CASTLE integrates the strengths of visual foundation models trained on large datasets possess open-world visual concepts, including Segment Anything (SA), DeAOT, and DINOv2, for one-shot image segmentation and unsupervised visual feature extraction. Furthermore, CASTLE employs unsupervised multi-stage and/or multi-layer UMAP clustering algorithms to distinguish behavioral clusters with unique temporal variability.
Install
Step 1 Install CASTLE Core Function
pip install castle-ai
Step 2 Install xFormer and GPU Version of UMAP (Optional for Speed Up)
For CUDA 12 Users
pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
pip install -U cudf-cu12 cuml-cu12 --extra-index-url=https://pypi.nvidia.com
For CUDA 11 Users
pip install -U xformers --index-url https://download.pytorch.org/whl/cu118
pip install -U cudf-cu11 cuml-cu11 --extra-index-url=https://pypi.nvidia.com
Step 3 Download Web UI
git clone https://github.com/CASTLE-ai/castle-ai.git
Step 4 Download Pretrained Model
for Colab/Linux user
The model will download when you need to use it.
If you want to download models now
cd castle-ai/
mkdir ckpt
bash download_ckpt.sh
for other user
cd castle-ai/
mkdir ckpt
Then, download the models from the web by copying the links to the Chrome browser and downloading them.
https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_pretrain.pth
https://drive.google.com/file/d/1g4E-F0RPOx9Nd6J7tU9AE1TjsouL4oZq/edit
https://drive.google.com/file/d/1QoChMkTVxdYZ_eBlZhK2acq9KMQZccPJ/edit
Afterward, place them into the ckpt folder.
castle-ai
├── castle
└── ckpt
├── dinov2_vitb14_reg4_pretrain.pth
├── R50_DeAOTL_PRE_YTB_DAV.pth
├── sam_vit_b_01ec64.pth
└── SwinB_DeAOTL_PRE_YTB_DAV.pth
Run
python app.py
Reference
We would like to express our gratitude for the assistance received from the following projects during the development of this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file castle_ai-0.0.11.tar.gz
.
File metadata
- Download URL: castle_ai-0.0.11.tar.gz
- Upload date:
- Size: 124.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d639fb666ddc7795e291e0619a22282ce585a69ac47c0c642a829bdbfa5c85a |
|
MD5 | 5ed24a51ba93ea23dd7a8f9ba6d34cb7 |
|
BLAKE2b-256 | d4540fc014f43948565a02494a8a6295636c80d9e4e3debc7c2e10d906b1a6b4 |
File details
Details for the file castle_ai-0.0.11-py2.py3-none-any.whl
.
File metadata
- Download URL: castle_ai-0.0.11-py2.py3-none-any.whl
- Upload date:
- Size: 162.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0f8ab09442ceb0493ca6c9b63b65e8412d20116efa4c13cf8a6fec37c674e36 |
|
MD5 | ebbe9d6c05edc34601db6c24b185b55a |
|
BLAKE2b-256 | f3fb34c6b961a9558b025d1f235343a8d666a14277d1bad9460c5a09e1bf7602 |