This project has been tested and is supported on the following configurations:
-
Operating System
- Linux (tested on Ubuntu 18.04 and 20.04)
-
GPU Support
- NVIDIA GPU with CUDA capability
(tested with NVIDIA Driver Version: 555.42.06, CUDA Version: 12.5)
- NVIDIA GPU with CUDA capability
-
Container Runtime
- Singularity / Apptainer
(tested with apptainer version 1.3.6-1.el8)
- Singularity / Apptainer
git clone https://github.com/CNCLgithub/Woven.git
cd Wovenbash setup.sh all./run.sh julia src/exp_basic.jl <folder_index>/<scene_name>_<mass_value>_<stiffness_value>-
<folder_index>corresponds to the scenario:1→wind2→drape3→ball4→rotate
-
<scene_name>is one of:wind,drape,ball,rotate -
<mass_value>and<stiffness_value>specify the physical parameters
./run.sh julia src/exp_basic.jl 1/wind_0.5_2.0
./run.sh julia src/exp_basic.jl 2/drape_0.5_0.0078125
./run.sh julia src/exp_basic.jl 3/ball_0.5_0.0078125
./run.sh julia src/exp_basic.jl 4/rotate_0.5_2.0./run.sh julia src/exp_basic_marg.jl <folder_index>/<target_scene>_<target_mass>_<target_stiffness> \
<experiment_tag> \
<random_seed>_<test_scene>_<test_mass>_<test_stiffness>_<random_suffix> \
<inferred_test_mass> \
<inferred_test_stiff> \
<particle_weights_test>-
<folder_index>corresponds to the scenario:1→wind2→drape3→ball4→rotate
-
<target_scene>specify the scene of the target item, should be one of:wind,drape,ball,rotate. -
<target_mass>and<target_stiffness>specify the physical parameters of the target item. -
<experiment_tag>should bestiffnessormass. -
<test_scene>specify the scene of the test item. -
<test_mass>and<test_stiffness>specify the physical parameters of the test item. -
<inferred_test_mass>: Underscore (_) separated list of inferred mass values of the test item from all particles in the final step of the particle filter. For example, if you use 20 particles, this will contain 20 mass values (one for each particle). Example:0.25_0.5_0.5_0.75_0.6_...(20 values total). -
<inferred_test_stiff>: Underscore (_) separated list of inferred stiffness values of the test item from all particles in the final step of the particle filter. For example, if you use 20 particles, this will contain 20 stiffness values (one for each particle). -
<particle_weights_test>: Underscore (_) separated list of weights for the particles used in the inference of the test item. Each weight corresponds to one particle's posterior probability from the final step of the particle filter. The weights should sum to 1 (up to numerical precision). Example:0.05_0.10_0.07_0.08_...(20 values total).
bash demo_marg.shTake the stiffness matching task as an example. Suppose we have a trial consisting of:
- Test (match):
wind_0.5_0.0078125 - Target:
drape_2.0_0.0078125 - Test (distractor):
rotate_0.25_2.0
We proceed as follows:
-
Run the inference process (see step 3 above) separately for each of the two test items:
- This produces 20 particles per test item.
- Each particle carries an inferred mass and stiffness, along with an associated weight from the particle filter.
-
For each test item, use its particle filter results as the prior to run the marginalization process on the target item (see step 4 above).
-
Repeat this process for every trial in the dataset.
The key tunable parameters of the model are listed below. These can be adjusted to optimize performance or explore model behavior under different settings.
num_particles = 20 # Number of SMC particles
total_masks = 3 # Defines length of flow mask# Defines mass random walk
MASS_VAR_SMALL = 0.04
MASS_VAR_LARGE = 0.8
MASS_BERNOULLI = 0.8
# Defines stiffness random walk
STIFF_VAR_SMALL = 0.02
STIFF_VAR_LARGE = 0.4
STIFF_BERNOULLI = 0.8
# Defines observation noise
DEPTH_MAP_VAR = 8
# Defines wind random walk
WIND_VAR = 0.3