Attetioceter是一个机器学习模型,这个仓库包含:
一个TesorFlowLite模型,可用于预测图像的注意中心,即图像中最突出的部分所在的区域一个Pytho脚本,可用于使用注意力中心对图像进行批量编码。这可以和子模块libjxl一起使用,以便创建JPEGXL图像,这样解码图像将从由模型决定的注意中心开始。GoogleAttetioceter模型的一些预测实例,其中绿点是模型预测的图像注意力中心点。
如何使用请确保你已经安装了Pytho和Tesorflow:
从GitHub上克隆它,包括子模块构建libjxl,按照libjxlrepo中给出的说明运行ecode_with_ceters.py脚本。gitcloehttps://github.com/google/attetio-ceter--recursive--shallow-submodulescdattetio-ceter/libjxlmkdirbuildcdbuildcmake-DCMAKE_BUILD_TYPE=Release-DBUILD_TESTING=OFF..cmake--build.---j$(proc)cd../../pythoecode_with_ceters.py--lite_model_file=./model/ceter.tflite\--image_dir="${INPUT_IMAGE_DIR}"--output_dir="${OUTPUT_IMAGE_DIR}"有以下标志:
--[o]dry_ru:Iftrue,olydoadryru,dootwritefiles.(default:'false')--ecoder:Locatioofthecoderbiary.--image_dir:Nameofthedirectoryofiputimages.(default:'./libjxl/build/tools/cjxl')--lite_model_file:PathtothecorrespodigTFLitemodel.--ew_suffix:Fileextesioofthecompressedfile.(default:'jxl')--output_dir:Nameofthedirectoryoftheoutputimages.--[o]verbose:Iftrue,pritsifoaboutthecommadsexecuted.(default:'true')







评论