Created
November 25, 2019 05:00
-
-
Save gatheluck/35161cdb34c9058bad9af22d027109dd to your computer and use it in GitHub Desktop.
script generator which renders each class of ShapeNet dataset.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -A ids=([airplane]=02691156 [bench]=02828884 [cabinet]=02933112 [car]=02958343 [chair]=03001627 [display]=03211117 [lamp]=03636649 [loudspeaker]=03691459 [rifle]=04090263 [sofa]=04256520 [table]=04379243 [telephone]=04401088 [watercraft]=04530566) | |
classes=(airplane bench cabinet car chair display lamp loudspeaker rifle sofa table telephone watercraft) | |
dataset_path='' | |
blender_path='' | |
output_path='' | |
num_views=24 | |
project=render_shapenet # write project name here!! | |
mkdir -p ${project} | |
for class in ${classes[@]}; do | |
name=${project}_${class} | |
logpath=/home/aab11205rv/project/ins_cvpr2020/abci_log/${name}.o | |
filename=${project}/${name}.sh | |
echo -e "#!/bin/bash\n\n#$ -l rt_F=1\n#$ -l h_rt=24:00:00\n#$ -j y\n#$ -N ${name}\n#$ -o ${logpath}\n\n" > ${filename} | |
echo -e "export PATH=/home/aab11205rv/miniconda3/bin:\${PATH}\nsource activate ins\n\n" >> ${filename} | |
echo -e "export PATH=/apps/gcc/7.3.0/bin:\${PATH}\nexport LD_LIBRARY_PATH=/apps/gcc/7.3.0/lib64:\${LD_LIBRARY_PATH}\n\n" >> ${filename} | |
echo -e "source /etc/profile.d/modules.sh\nmodule load singularity/2.6.1\nmodule load cuda/10.0/10.0.130\nmodule load cudnn/7.6/7.6.2\n\n" >> ${filename} | |
echo -e "export CUDA_VISIBLE_DEVICES=0,1,2,3\n\n" >> ${filename} | |
echo -e "cd /home/aab11205rv/project/ins_cvpr2020/unsupervised-atlasnet\n" >> ${filename} | |
echo -e "find ${dataset_path}/${class}/* -name model.obj -print0 | xargs -0 -n1 -P30 -I {} ${blender_path}/blender-2.79-linux-glibc219-x86_64/blender --background --python render_blender.py -- --views ${num_views} --output_folder ${output_path}/${class} {} " >> ${filename} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment