Tool for labeling images
Project description
Image Clustering and Segmenting: icas
Tool for clustering and segmenting image datasets. Detailed descriptions for packages and pipelines can be found in github repo. Below is just basic usage sytle.
Test the whole system pipeline with:
* clusterimg test
import icas.clusterimg.clusterimg_test as ct
ct()
* Deep Learning clusterimg test
import icas.clusterimg.DL_clusterimg_test as dl_ct
dl_ct()
* segmentimg test
import icas.segmentimg.segmentimg_test as st
st()
Use the icas systems with:
* clusterimg
from icas.clusterimg.Clusteror import Clusteror
test_path = "path/to/images"
method = "TM"
batch_size = 500
threshold = 0.5
cl = Clusteror(test_path, method, method, threshold=threshold, overwrite=True)
cl()
* Deep Learning clusterimg
from icas.clusterimg.DL_ModelTrainer import ModelTrainer
from icas.clusterimg.DL_Datasets import ImageDataset
from icas.clusterimg.DL_Models import PowerOf2s32to128
from icas.clusterimg.DL_Clusteror import DL_Clusteror
device = "cpu"
method = "kmeans"
loss = "mse"
test_path = "path/to/images"
mt = ModelTrainer(num_of_epochs=1, lr=0.001, batch_size=2, loss_type=loss, dataset=ImageDataset(test_path), model=PowerOf2s32to128(), verbose=0, device=device)
dlc = DL_Clusteror(model_trainer=mt, method=method, batch_size=100, overwrite=True, verbose=0)
dlc()
* segmentimg
from icas.segmentimg.Segmentator import Segmentator
test_path = "path/to/images"
method = "graph"
sg = Segmentator(test_path, method=method)
sg()
To user attention:
We insist you to add comments, descriptions and example usage to your contributions
Below libraries are not installed with icas since aim for icas is to be lightweight. Advanced usage such as Deep Learning Clustering and SAM segmentation requires below installations:
pip install torch
pip install torchvision
pip install scikit-learn
pip install git+https://github.com/facebookresearch/segment-anything.git
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
icas-1.1.tar.gz
(41.0 kB
view details)
Built Distribution
icas-1.1-py3-none-any.whl
(44.3 kB
view details)
File details
Details for the file icas-1.1.tar.gz
.
File metadata
- Download URL: icas-1.1.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd29f01d81e20bbf23c192b4aa62381244434d99fed470eaeebdc7f3dc52e21 |
|
MD5 | 4af199cfad3585601712803f924928c2 |
|
BLAKE2b-256 | c517a89ddf3d474520ebd6d1dc77f8b82491329fb2d796cf0a5807df1379a9d5 |
File details
Details for the file icas-1.1-py3-none-any.whl
.
File metadata
- Download URL: icas-1.1-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b1d8e5a08e2e43ff1118b3fdfbb8d1c2663e65a92f5233a2915fe8aa5f312e4 |
|
MD5 | 4cfbc8b74e034a20964be23429a76931 |
|
BLAKE2b-256 | 7d9c70d8497663deae82be3333f932e631e4baacfc61b44647d92bed13417ac7 |