a `e|@sFddlZddlmZddlmZddlmZddlmZd ddZdS) N) get_model)log)run)ioc Cstj|dd}tj|r$t|zttddddd}|durtd|||fd |id tj|r|t|t||qt d nt d t Wn6t y}zt d t |WYd}~n d}~00dS)Nz .classified)postfixZopenpointclasszdhttps://github.com/uav4geo/OpenPointClass/releases/download/v1.1.3/vehicles-vegetation-buildings.zipzv1.0.0z model.bin)namez$pcclassify "%s" "%s" "%s" -u -s 2,64OMP_NUM_THREADS)env_varsz:Cannot classify using OpenPointClass (no output generated)z$Cannot download/access model from %sz(Cannot classify using OpenPointClass: %s)rrelated_file_pathospathisfileremoverrrenamer ODM_WARNINGZ model_url Exceptionstr) point_cloud max_threads tmp_outputmodeler/code/opendm/opc.pyclassifys$     r)r) r Z opendm.airopendmr opendm.systemrrrrrrrs