Slide 1

Slide 1 text

$POTUSVDUJPOPGB%JHJUBM&YBN (SBEJOH4ZTUFNVTJOH5F9 :VTVLF5&3"%" 5FUTVSZPLVLBJ 5PLZP&EVDBUJPOBM*OTUJUVUF +BQBO August 11, 2019 TUG 2019 @ Palo Alto

Slide 2

Slide 2 text

"CPVU.F Yusuke TERADA from Tokyo, Japan A private preparatory school teacher for high-school students Japanese TeX Development Community A contributor to TeXShop development Major work: TeX2img https://tex2img.tech/

Slide 3

Slide 3 text

56(!+BQBO

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

6UJMJ[F5F9GPSQSPNPUJOH PQFSBUJPOBMF⒏DJFODZJOTDIPPM

Slide 7

Slide 7 text

TUBHF4FMFDUJPO ✦ Examinees: over 570,000 students ✦ Multiple-choice test ✦ Automatically scored by computers ✦ Used as cut-offs for the 2nd stage First Stage National Center Test for
 University Admissions

Slide 8

Slide 8 text

TUBHF4FMFDUJPO ✦ Examinees: students who passed the 1st stage
 (Required score depends on each university) ✦ Style: descriptive paper test ✦ Graders: professors at each university Second Stage Exams conducted by
 individual universities

Slide 9

Slide 9 text

1SFQBSBUPSZ4DIPPMT Privately-run schools which provide education supplementary to public education Aim to help students prepare entrance exams Conduct practice exams on a regular basis

Slide 10

Slide 10 text

4QFDJpDBUJPOTPG1SBDUJDF&YBNT Paper-and-pencil exam in a descriptive manner Examinees: over 800 students Graded by humans Assigned time for grading: less than one week Fairness is strictly required Graders correct answers and add comments Return feedback to examinees

Slide 11

Slide 11 text

Answer sheet

Slide 12

Slide 12 text

Pile of answer sheets

Slide 13

Slide 13 text

#FGPSF5F9 1. Sort answer sheets by hand 2. Divide a pile of answer sheets into some piles 3. Graders score their assigned problems in parallel 4. Exchange the piles to each other

Slide 14

Slide 14 text

Divided piles

Slide 15

Slide 15 text

Phase 1 Grader 1 Grader 2 Grader 3

Slide 16

Slide 16 text

Phase 2 Grader 1 Grader 2 Grader 3

Slide 17

Slide 17 text

Phase 3 Grader 1 Grader 2 Grader 3

Slide 18

Slide 18 text

#FGPSF5F9 5. Transcribe hand-written scores into Excel 6. Cross-check the transcribed scores visually

Slide 19

Slide 19 text

#FGPSF5F9 5. Transcribe hand-written scores into Excel 6. Cross-check the transcribed scores visually Insanely Inefficient

Slide 20

Slide 20 text

#FGPSF5F9 5. Transcribe hand-written scores into Excel 6. Cross-check the transcribed scores visually Insanely Inefficient Improving efficiency using IT is imperative!

Slide 21

Slide 21 text

3FRVJSFNFOUTGPSUIF
 /FX%JHJUBM(SBEJOH4ZTUFN Paper-and-pencil style must be maintained. Multiple graders should be able to score in parallel on the digital system. Privacy and fairness should be secured. The system must be run on macOS/iOS. Feedback to examinees should be returned in paper.

Slide 22

Slide 22 text

4PMVUJPO Construct a Digital Exam Grading System Utilize TeX as a PDF manipulation tool

Slide 23

Slide 23 text

5F9TZTUFNBTB1%' NBOJQVMBUJPOUPPM pdfTeX has a lot of powerful primitives that manipulate PDF since early times. Recently (x)dvipdfmx has been enhanced in terms of PDF manipulation.

Slide 24

Slide 24 text

3FDFOUFOIBODFNFOUTPG Y EWJQEGNY extractbb is automatically invoked when needed. (TL2015) page option of \includegraphics is supported. (TL2015) pagebox option of \includegraphics is supported. (TL2016) \includegraphics supports direct input of Adobe Illustrator files. (TL2014) pdfpages package supports (x)dvipdfmx. (TL2015) (x)dvipdfmx supports rotated PDF pages. (TL2018)

Slide 25

Slide 25 text

\includegraphicsPQUJPOT \includegraphics[page=2, pagebox=artbox, viewport=0 20 40 80, scale=2.5, clip] {foobar.pdf} pageɿPDF page number to include pageboxɿmediabox/cropbox/trimbox/bleedbox/artbox viewportɿbounding box relative to pagebox scaleɿmagnification scale factor clipɿhide outside of bounding box

Slide 26

Slide 26 text

5IFXPSLqPXPGUIFOFXMZCVJMU EJHJUBMHSBEJOHTZTUFNVTJOH5F9

Slide 27

Slide 27 text

4UFQ1SFQBSF"OTXFS4IFFUT Make individualized answer sheets using TeX

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Collection of \rule's

Slide 30

Slide 30 text

Criterial marks used for image correction Drawn with TikZ

Slide 31

Slide 31 text

Individualized sheet QR code generated by qrcode package

Slide 32

Slide 32 text

RSDPEFQBDLBHF QR code generator written in pure TeX Developed by Anders Hendrickson Included in CTAN and TeX Live

Slide 33

Slide 33 text

RSDPEFQBDLBHF QR code generator written in pure TeX Developed by Anders Hendrickson Included in CTAN and TeX Live Each block is drawn with \rule

Slide 34

Slide 34 text

After conducting an exam, scan the collected answer sheets and obtain scanned-PDF. 4UFQ4DBOBOTXFSTIFFUT

Slide 35

Slide 35 text

Scanned answer sheets

Slide 36

Slide 36 text

4UFQ3FBE TPSUBOEDPSSFDUJNBHFT Identify the examinee of each sheet based on the embedded QR code Sort images by the numbers encoded in the QR codes Correct the scanned-images based on the criterial marks Paper orientation Translation Rotation Distortion

Slide 37

Slide 37 text

%Z/".J,4 DyNamic Asynchronous Mark-interpretation Kernel System Developed by Mitsuhiro DAIMON (Physics teacher at our school) Written in Swift and Objective-C Run natively on macOS Use macOS Cocoa API for PDF handling Adopt OpenCV as its image-processing engine Being developed on GitHub
 (but currently not open-sourced, sorry.)

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Recognize images with high accuracy

Slide 40

Slide 40 text

By using
 
 Split each answer sheet Make grading forms 4UFQ.BLFHSBEJOHGPSNT \includegraphics[page=...,viewport=...]

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Grading Form

Slide 43

Slide 43 text

(SBEJOH'PSN Import only specific problems assigned to each grader

Slide 44

Slide 44 text

(SBEJOH'PSN Remove name and import QR code For privacy and fairness

Slide 45

Slide 45 text

(SBEJOH'PSN Distinguish background by color White area: feedback Gray area: note \pagecolor{black!20!white}

Slide 46

Slide 46 text

Evaluation criteria (SBEJOH'PSN

Slide 47

Slide 47 text

(SBEJOH'PSN Mark-columns for scores

Slide 48

Slide 48 text

iPad Pro + Apple Pencil + GoodNotes Hardware Software 4UFQ1FSGPSNHSBEJOHXJUIJ1BE

Slide 49

Slide 49 text

After grading

Slide 50

Slide 50 text

Write feedback within white area Fill scores

Slide 51

Slide 51 text

4UFQ&YQPSUHSBEJOHGPSNTBT1%'

Slide 52

Slide 52 text

4UFQ3FBETDPSFTXJUI%Z/".J,4 Collect (examinee number, score) data examinee number score

Slide 53

Slide 53 text

Restore answer sheets to return from grading forms 4UFQ3FTUPSFBOTXFSTIFFUT

Slide 54

Slide 54 text

Grading forms of a single examinee

Slide 55

Slide 55 text

Grading forms of a single examinee Merge feedback areas into one sheet

Slide 56

Slide 56 text

Restored answer sheet

Slide 57

Slide 57 text

Each area is pasted from grading forms with \includegraphics

Slide 58

Slide 58 text

Examinee's name is restored from the original PDF with \includegraphics

Slide 59

Slide 59 text

TeX overprints score digits read by DyNAMiKS on the sheet image

Slide 60

Slide 60 text

4UFQ1SJOUTIFFUTBOESFUVSOGFFECBDL Print the restored answer sheets in color Return them to students in classrooms

Slide 61

Slide 61 text

Analysis sheet

Slide 62

Slide 62 text

Analysis sheet Automatically generated by TikZ + tcolorbox

Slide 63

Slide 63 text

8PSLqPX4VNNBSZ 1. Make individualized answer sheets by TeX and conduct an exam. 2. Scan the answer sheets into PDF. 3. Sort and correct the scanned-PDF with DyNAMiKS. 4. Split them and generate grading forms by TeX. 5. Perform grading with iPad Pro + Apple Pencil + GoodNotes. 6. Read scores by DyNAMiKS. 7. Restore answer sheets and overprint scores by TeX. 8. Generate analysis sheets by TikZ + tcolorbox. 9. Print sheets and return them to students in paper.

Slide 64

Slide 64 text

"MMJO0OF"QQ macOS GUI App

Slide 65

Slide 65 text

3FTVMU Time for grading: shortened Fairness: enhanced Risk of losing answer sheets: disappeared Transcription by hand: no longer necessary

Slide 66

Slide 66 text

3FTVMU Time for grading: shortened Fairness: enhanced Risk of losing answer sheets: disappeared Transcription by hand: no longer necessary Efficiency: improved

Slide 67

Slide 67 text

%J⒏DVMUZ "Too many images in a document" × 800 students

Slide 68

Slide 68 text

texk/dvipdfm-x/spc_pdfm.c texk/dvipdfm-x/pdfximage.h

Slide 69

Slide 69 text

texk/dvipdfm-x/spc_pdfm.c texk/dvipdfm-x/pdfximage.h Not enough!

Slide 70

Slide 70 text

texk/dvipdfm-x/spc_pdfm.c texk/dvipdfm-x/pdfximage.h Not enough! This limitation was abolished at TeX Live 2018

Slide 71

Slide 71 text

'VUVSF8PSL Handwritten Digit Recognition

Slide 72

Slide 72 text

'VUVSF8PSL MNIST

Slide 73

Slide 73 text

'VUVSF8PSL Our digits MNIST

Slide 74

Slide 74 text

$PODMVTJPO TeX is useful also as a PDF manipulation tool. TeX has enormous potential to automate daily tasks and enhance efficiency. Explore further utilization of TeX 
 as an automation tool!