Skip to content

Commit 36ca612

Browse files
authored
Update Tutorial_tools.md
1 parent b462062 commit 36ca612

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/Tutorial_tools.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,40 @@ iv) Click the `RUN` button. You can follow the progress in the main SimBA termin
647647
v) Once complete, new videos will be stored in your selected output directory.
648648

649649

650+
### REMOVE BACKGROUND FROM A SINGLE VIDEO
651+
652+
<p align="center">
653+
<img src="https://github.com/sgoldenlab/simba/blob/master/images/bg_removal_single.webp" />
654+
</p>
655+
656+
* In `VIDEO PATH`, click <kbd>BROWSE</kbd> and select the file you which to remove the background from.
657+
* OPTIONAL: In `BACKGROUND REFERENCE VIDEO PATH`, click <kbd>BROWSE</kbd> and select a video file that represents the background (has no animals visible but otherwise representative / near identical copy of video selected in `VIDEO PATH`)
658+
> [!NOTE]
659+
> `BACKGROUND REFERENCE VIDEO PATH` can often be left blank (do not select any video). If no video is selected, the background with be computed from the `VIDEO PATH`.
660+
* `COMPUTE BACKGROUND FROM ENTIRE VIDEO`: The background can be computed from the entire video, of a segment of the video. If you want to compute it from teh entire video, check the `COMPUTE BACKGROUND FROM ENTIRE VIDEO` checkbox.
661+
- `BACKGROUND VIDEO START (FRAME # OR TIME)`: If **un-checking** the `COMPUTE BACKGROUND FROM ENTIRE VIDEO`, we need to select a segment of the background video which we will use to compute the background. Enter the **START** time (e.g., `00:00:00`) or or start frame (e.g., `0`) of the segment here.
662+
- `BACKGROUND VIDEO END (FRAME # OR TIME)`: If **un-checking** the `COMPUTE BACKGROUND FROM ENTIRE VIDEO`, we need to select a segment of the background video which we will use to compute the background. Enter the **END** time (e.g., `00:00:20`) or or start frame (e.g., `1200`) of the segment here.
663+
* `MULTIPROCESS VIDEO (FASTER): To use multiprocessing, and process each image of the video in parallel on each of your available CPU cores, check this box and select how many cores you want to use in the `CPU cores` dropdown.
664+
665+
Once complete, hit the <kbd>RUN</kbd> button. You can follow the progress in the main SimBA terminal window and the operating system terminal window. The background removed video will be saved in the same directory as the `VIDEO PATH` with the `_bg_subtracted` suffix.
666+
667+
### REMOVE BACKGROUND FROM ALL VIDEOS IN A DIRECTORY
668+
669+
<p align="center">
670+
<img src="https://github.com/sgoldenlab/simba/blob/master/images/bg_removal_directory.webp" />
671+
</p>
672+
673+
* In `VIDEO DIRECTORY`, click <kbd>BROWSE</kbd> and select the directory containing videos you want to remove the background from.
674+
* OPTIONAL: In `BACKGROUND VIDEO DIRECTORY`, click <kbd>BROWSE</kbd> and select a directory containing videos mirring the filenames of the videos in the `VIDEO DIRECTORY` but have animals visible but otherwise representative / near identical copy of video selected in `VIDEO DIRECTORY`.
675+
> [!NOTE]
676+
> `BACKGROUND VIDEO DIRECTORY` can most often be left blank (do not select any directory). If no directory is selected, the background with be computed from the videos in `VIDEO DIRECTORY` themselves.
677+
* `COMPUTE BACKGROUND FROM ENTIRE VIDEO`: The background can be computed from the entire videos, of a segment of the videos. If you want to compute it from the entire videos, check the `COMPUTE BACKGROUND FROM ENTIRE VIDEO` checkbox.
678+
- `BACKGROUND VIDEO START (FRAME # OR TIME)`: If **un-checking** the `COMPUTE BACKGROUND FROM ENTIRE VIDEO`, we need to select a segments of the background videos which we will use to compute the background. Enter the **START** time (e.g., `00:00:00`) or or start frame (e.g., `0`) of the segment here.
679+
- `BACKGROUND VIDEO END (FRAME # OR TIME)`: If **un-checking** the `COMPUTE BACKGROUND FROM ENTIRE VIDEO`, we need to select a segments of the background videos which we will use to compute the background. Enter the **END** time (e.g., `00:00:20`) or or start frame (e.g., `1200`) of the segment here.
680+
* `MULTIPROCESS VIDEO (FASTER): To use multiprocessing, and process each image of the video in parallel on each of your available CPU cores, check this box and select how many cores you want to use in the `CPU cores` dropdown.
681+
682+
Once complete, hit the <kbd>RUN</kbd> button. You can follow the progress in the main SimBA terminal window and the operating system terminal window. The background removed video will be saved in the same directory as the `VIDEO PATH` with the `_bg_subtracted` suffix.
683+
650684
##
651685
Author [Simon N](https://github.com/sronilsson), [JJ Choong](https://github.com/inoejj)
652686

0 commit comments

Comments
 (0)