Overview

The character region detection app is published at the following link.

https://huggingface.co/spaces/nakamura196/yolov5-char

The above app had stopped working, so I fixed it following the same procedure as in the following article.

The model used in this app was built using the “Japanese Classical Character Dataset” (held by NIJL and others / processed by CODH) doi:10.20676/00000340.

I also made some minor improvements during this fix, which I will introduce here.

Setting the Height of gr.JSON

When the returned JSON data becomes large, the results could be difficult to view.

By configuring demo.css as follows:

dd.}"deej"emms"moooo.nh.=c-evlshieagsogrurlhfn.=dtlcIe:ohn"rw(t"3:)e"{0r0afpuaxtc;oe;(yolo,inputs,outputs,title=title,description=description,article=article,examples=examples)

The results can now be displayed with a scrollbar as shown below.

Returning Only Bounding Boxes

When there are many characters, the “Output Image” could be hard to see. To address this, I added the output “Output Image with Boxes.”

This is achieved with the following processing:

defyrdri#odfr]oefemuroelss_Ctartou=wopwu(l=inubxyxydroriitrtvt=bmmmmrnuemmsejhe_iiaaats,)ss_riIinnxxw[p,:=uobtmmn.ulnoaa====rtmt.xtggre_osleheeebbbbcid.oseDsbbbbtmepa=r:[[[[aalad=na''''ng(nsuIwxyxygeid(rmm.mmmml,madepaDiiaae)sfsygrnnxx(()uea''''[)la.w]]]]x#.trf(mxsrriiiy.aomnnxrym),fyeae[nbryr0darme]ecain.rkynct((,eo)ti_[omxj0_ms]awaonixnt,(#ihom_yrrabmiegoaesexxnue]tls,=t)"sor.uertcelonirdndeesr="("))rerde"t,urwnisdtah=l3i)stofimages

Summary

I hope this serves as a helpful reference.