Skip to content

Instantly share code, notes, and snippets.

@hohonuuli
Last active March 15, 2021 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hohonuuli/c163b85faded9a426b447770388bf99d to your computer and use it in GitHub Desktop.
Save hohonuuli/c163b85faded9a426b447770388bf99d to your computer and use it in GitHub Desktop.
Pascal VOC modeled in Scala. For medium article
case class Voc(
filename: String,
objects: Seq[VocObject] = Nil
)
case class VocObject(
name: String,
xmin: Int,
ymin: Int,
xmax: Int,
ymax: Int
) {
val width = xmax - xmin
val height = ymax - ymin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment