SegAL
SegAL is an active learning freamwork for semantice segmentation.
Installation
SegAL is available on PyPI:
pip install segal
SegAL officially supports Python 3.8.
Active Learning Cycle
To understand what SegAL can do, we first introduce the pool-based active learning cycle.
- Step 0: Prepare seed data (a small number of labeled data used for training)
- Step 1: Train the model with seed data
- Step 2: Predict unlabeled data with the trained model
- Step 3: Query informative samples based on predictions
- Step 4: Annotator (Oracle) annotate the selected samples
- Step 5: Input the new labeled samples to labeled dataset
- Step 6: Retrain model
- Repeat step2~step6 until the f1 score of the model beyond the threshold or annotation budget is no left
SegAL can simulate the whole active learning cycle.
Usage
The user can execute the below command to run the active learning cycle.
python examples/run_al_cycle.py --dataset CamVid --data_path ./data/CamVid/ --model_name Unet --encoder resnet34 --encoder_weights imagenet --num_classes 12 --strategy LeastConfidence --seed_ratio 0.02 --query_ratio 0.02 --n_epoch 1
dataset: which dataset to use,CamVid、VOC、CityScapesdata_path: the path where the data storenum_classes: number of classesmodel_name: name of segmentation model. More model names can be found in architecturesencoder: name of encoder used in model. More encoder names can be found in encodersencoder_weights: pretrained weights. See encoder table with available weights for each encoderstrategy: name of sampling strategy. Available strategies:RandomSampling,LeastConfidence,MarginSampling,EntropySampling,CealSampling,VoteSampling. You can find the papers for these strategy in hereseed_ratio: percentage of seed data. The used for initial training.query_ratio: percentage of queried data in each roundn_epoch: number of epoch in each round
More explanation can be found in usage
Metadata
Release files for segal 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| segal-0.1.4.tar.gz | 13.0 kB | Without provenance | Details for segal-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| segal-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for segal-0.1.4-py3-none-any.whl |
Total release size: 32.8 kB
Release files / segal-0.1.4.tar.gz
| Download URL | segal-0.1.4.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21da670a23f87d1d667b6906449663dd2a920e580aca419d40cfa563b4a94cb2
|
|
BLAKE2b-256 checksum How to use checksums |
25b23888fbfdf551f87fde6d8a65dd083ae6227ffb6f093bf43b461548389288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.8.15 Darwin/22.1.0
|
Release files / segal-0.1.4-py3-none-any.whl
| Download URL | segal-0.1.4-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75207669e5843546aa58a52ed8e3feaaf1aab74ece6c3ec5e15399e0f1aa1b25
|
|
BLAKE2b-256 checksum How to use checksums |
d9ac2405538e93d974895b6e6cb08a7af584a7f14ba7a1537f535d174964ced6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.8.15 Darwin/22.1.0
|
Security for segal 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.