Follow Along! ============== .. raw:: html

Follow along: Background Example

The program launching process along with parameter settings are all simplified and set up on the Jupyter Notebook Environment.
(The Jetson Board used for these examples are => Jetson Nano)
.. thumbnail:: /_images/background/background_2_remove_result.jpg .. thumbnail:: /_images/background/background_3_replace_result.jpg .. raw:: html
- 02_07-1. background.ipynb - | Running the cell code | `Ctrl + Enter` .. thumbnail:: /_images/background/background_0.png - Initialize your output stream, and your path, and import in the Image library .. code-block:: python from IPython.display import Image %env DISPLAY=:0 %env PROGRAM_PATH=/home/zeta/jetson-inference/build/aarch64/bin %env INPUT_PATH=/home/zeta/jetson-inference/build/aarch64/bin/images %env OUTPUT_PATH=/home/zeta/jetson-inference/build/aarch64/bin/images/test input_path='/home/zeta/jetson-inference/build/aarch64/bin/images' output_path='/home/zeta/jetson-inference/build/aarch64/bin/images/test' - Check all the available any pictures within the system .. code-block:: python !ls $INPUT_PATH/* .. thumbnail:: /_images/background/background_1_list.png | - Pick one of the image and initialize the image/ output name. .. code-block:: python image_name = 'ChangeMe' output_name1 = 'background_remove.jpg' output_name2 = 'background_replace.jpg' %env IMAGE_NAME = $image_name %env OUTPUT_NAME = $output_name Image(filename=input_path+'/'+image_name) | - Remove the background! .. code-block:: python %%capture !python3 $PROGRAM_PATH/backgroundnet.py --network=u2net $INPUT_PATH/$IMAGE_NAME $OUTPUT_PATH/$OUTPUT_NAME1 - Show the resulting image .. code-block:: python Image(filename=output_path+'/background_remove.jpg') .. thumbnail:: /_images/background/background_2_remove_result.jpg | - Change the background! .. code-block:: python %%capture !python3 $PROGRAM_PATH/backgroundnet.py --network=u2net --replace=$INPUT_PATH/Ulleung_0.jpg $INPUT_PATH/$IMAGE_NAME $OUTPUT_PATH/$OUTPUT_NAME2 - Show the resulting image .. code-block:: python Image(filename=output_path+'/background_replace.jpg') .. thumbnail:: /_images/background/background_3_replace_result.jpg