Gradiant / pyodi

Python Object Detection Insights
https://gradiant.github.io/pyodi/
Mozilla Public License 2.0
192 stars 16 forks source link

json files will be written using utf-8 encoding #187

Closed gachiemchiep closed 1 year ago

gachiemchiep commented 1 year ago

Hello. When working with image files that have utf-8 character in filename, this tool will not write json in utf-8 encoding . So I make this PR.

jorgenusan commented 1 year ago

Thanks for the contribution!

Just two things:

  1. We just updated the pre-commit.yml to fix the CI/lint error. You can merge it from main to fix that part.
  2. to fix the test, on the following line: https://github.com/Gradiant/pyodi/blob/master/tests/apps/test_coco_merge.py#L87 add a new parameter ensure_ascii=False.
gachiemchiep commented 1 year ago
1. We just updated the `pre-commit.yml` to fix the `CI/lint` error. You can merge it from main to fix that part.

I have merged from main.

2. to fix the test, on the following line: https://github.com/Gradiant/pyodi/blob/master/tests/apps/test_coco_merge.py#L87
   add a new parameter `ensure_ascii=False`.

I have added the parameter as you suggest.