yinguobing / face-mesh-generator

Generate face mesh dataset using Google's FaceMesh model.
GNU General Public License v3.0
118 stars 22 forks source link

碰到这样的错误 #3

Closed sudasu closed 3 years ago

sudasu commented 3 years ago

我是在facial-landmark-detection-hrnet项目中转过来的。我看facial-landmark-detection-hrnet的训练需要json文件,应该是通过本项目生成样本,但是我将wflw从官方下载解压后运行generate_mesh_dataset.py后,碰到如下问题:

D:\Anaconda3\envs\tf2.3\python.exe D:/Facial-Landmark-Detection/reference/facial-landmark-detection-hrnet-master/face-mesh-generator/generate_mesh_dataset.py 2020-12-28 19:23:22,786 - main - INFO - Starting to process dataset: wflw_train Traceback (most recent call last): File "D:/Facial-Landmark-Detection/reference/facial-landmark-detection-hrnet-master/face-mesh-generator/generate_mesh_dataset.py", line 341, in process(ds_wflw) File "D:/Facial-Landmark-Detection/reference/facial-landmark-detection-hrnet-master/face-mesh-generator/generate_mesh_dataset.py", line 82, in process tf_writer = MeshRecordOperator( File "D:\Facial-Landmark-Detection\reference\facial-landmark-detection-hrnet-master\face-mesh-generator\tfrecord_operator.py", line 44, in init self._writer = tf.io.TFRecordWriter(filename) File "D:\envs\tf2.3\lib\site-packages\tensorflow\python\lib\io\tf_record.py", line 298, in init super(TFRecordWriter, self).init( UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 70: invalid continuation byte 由此导致无法训练模型进行下一步工作,大佬可以指教一下吗

sudasu commented 3 years ago

不好意思,我这边已经解决了,但是代码中好像还是有点问题,我是写java的,后期我要是写了个java的转换json代码可以pull给您

yinguobing commented 3 years ago

HRNet那个项目不需要TFRecord文件。请检出对应分支 features/export-for-mark-regression 来导出训练用文件。

# README中有提到过
git checkout features/export_for_mark_regression