SYN70K (
| Model | Size | Param. | FLOPs | DS01 | DS02 | DS03 |
|---|---|---|---|---|---|---|
| LFEF | 0.853MB | 0.223M | 0.985G | 73.07% | 73.04% | 73.42% |
# Example
python val.py -ti /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/images/ -tm /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/masks/ -m /home/yaocong/Experimental/speed_smoke_segmentation/trained_models/best.pth
You will get the results:
model_name: <module 'models.LFEF' from '/home/yaocong/Experimental/speed_smoke_segmentation/models/LFEF.py'>
Testing on device cuda.
model size: 0.850 MB
Computational complexity(FLOPs): 983.66 MMac
Number of parameters: 222.89 k
model path: ./trained_models/best.pth
test_data: /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/images/
Number of test Images: 1000
100%|█| 1000/1000 [00:07<00:00, 135.11it/s, test_hd=12.3, test_loss=0.328, test_
FPS:135.1
totally cost: 0m 7s
loss: 0.3280
mIoU: 73.14%
Single GPU training
# Example
python main.py -bs 32 -train_dataset Host_SYN70K -e 500 -wn baseMultiple GPU training
# Example
python main.py -bs 32 -train_dataset Host_SYN70K -e 500 -wn base -gpus 0,1| Parameter | Description | Default Value |
|---|---|---|
| -train_dataset --train_dataset_path |
Path to the training dataset. | Host_SYN70K |
| -validation_dataset --validation_dataset_path |
Path to the validation dataset. | Host_DS0123 |
| -ti --train_images |
Path to the directory containing training images. | None |
| -tm --train_masks |
Path to the directory containing training masks. | None |
| -vi --validation_images |
Path to the directory containing validation images. | None |
| -vm --validation_masks |
Path to the directory containing validation masks. | None |
| -bs --batch_size |
Batch size for training. | 8 |
| -nw --num_workers |
Number of workers for data loading. | 1 |
| -e --epochs |
Number of epochs for training. | 150 |
| -lr --learning_rate |
Learning rate for the optimizer. | 0.001 |
| -wd --weight_decay |
Weight decay for the optimizer. | 0.00001 |
| -savedir --model_save_dir |
Directory to save the trained models. | ./trained_models/ |
| -device | Device to run the training on. Choose between 'CPU' and 'GPU'. | GPU |
| -gpus | GPU devices to use for training. For multiple GPUs, separate by comma. | 0 |
| -resume | Path to the last checkpoint. Use this to resume training. | None |
| -wn --wandb_name |
Name of the Weights & Biases run. Use 'no' to disable Weights & Biases. | no |
| -wid --wandb_id |
Weights & Biases run ID. | None |
| -sti --save_train_image |
Save the training images. Include this argument to enable this feature. | False |
| -svil --save_validation_image_last |
Save the last validation image. Include this argument to enable this feature. | False |
| -svib --save_validation_image_best |
Save the best validation image. Include this argument to enable this feature. | False |
# Example
python val.py -ti /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/images/ -tm /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/masks/ -m /home/yaocong/Experimental/speed_smoke_segmentation/trained_models/last.pth| Parameter | Description | Default Value |
|---|---|---|
| -ti, --test_images |
Path to the directory containing test images. | None (required) |
| -tm, --test_masks |
Path to the directory containing test masks. | None (required) |
| -bs, --batch_size |
Batch size for testing. | 1 |
| -nw, --num_workers |
Number of workers for data loading during testing. | 1 |
| -m, --model_path |
Path to the trained model to be used for testing. | "./trained_models/best.pth" |
| -wn, --wandb_name |
Name of the Weights & Biases run for testing. Use 'no' to disable Weights & Biases. | "no" |
# Example
python inference_multiple_pictures_for_evaluate.py -td /home/yaocong/Experimental/Dataset/SYN70K_dataset/testing_data/DS01/ -m /home/yaocong/Experimental/speed_smoke_segmentation/trained_models/best.pth| Parameter | Description | Default Value |
|---|---|---|
| -td, --test_directory |
Path to the directory containing test images. | None (required) |
| -m, --model_path |
Path to the trained model to be used for evaluation. | None (required) |
# Example
python smoke_segmentation.py -s /home/yaocong/Experimental/Dataset/smoke_video_dataset/Black_smoke_517.avi -m /home/yaocong/Experimental/speed_smoke_segmentation/trained_models/best.pth -show| Parameter | Description | Default Value |
|---|---|---|
| -s, --source |
Path to the image, video file, or directory to be tested. | None (required) |
| -m, --model_path |
Path to the trained model to be used for smoke segmentation. | None (required) |
| -vtf, --video_to_frames |
Convert the video to frames. Include this argument to enable this feature. | False |
| -save, --save_video |
Save the output video. Include this argument to enable this feature. | False |
| -show, --show_video |
Display the output video. Include this argument to enable this feature. | False |