<launch>

  <arg name="INPUT_IMAGE" />
  <arg name="INPUT_MASK" />
  <arg name="GPU" default="0" />
  <arg name="USE_MASK" default="false" />

  <arg name="required" default="false" />

  <node name="fcn_object_segmentation"
        pkg="jsk_perception" type="fcn_object_segmentation.py"
        output="screen"
        required="$(arg required)">
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
    <remap from="~input/mask" to="$(arg INPUT_MASK)" />
    <rosparam command="load" file="$(find jsk_perception)/config/voc_target_names.yaml" />
    <rosparam subst_value="true">
      gpu: $(arg GPU)
      model_name: fcn8s
      model_file: $(find jsk_perception)/trained_data/fcn8s_voc.npz
      use_mask: $(arg USE_MASK)
    </rosparam>
  </node>

  <node name="label_image_decomposer"
        pkg="jsk_perception" type="label_image_decomposer.py"
        required="$(arg required)">
    <remap from="~input" to="$(arg INPUT_IMAGE)" />
    <remap from="~input/label" to="fcn_object_segmentation/output" />
    <rosparam>
      queue_size: 100
    </rosparam>
    <remap from="~label_names" to="fcn_object_segmentation/target_names" />
  </node>

</launch>
