Welcome to the forum and thanks for being part of the TensorFlow.js community!
A few things.

Glad you were enjoying PoseNet however please consider upgrading to MoveNet which is almost 100x faster and much more accurate. PoseNet was good when it came out, but MoveNet is now the standard   Learn more here:


  
      

      blog.tensorflow.org
  

  
    

Next-Generation Pose Detection with MoveNet and TensorFlow.js

  MoveNet is a human pose detection architecture developed at Google that is ultra fast and accurate. It was designed to detect difficult poses


  

  
    
    
  

  



So for your new problem I would first ask if you need machine learning for this task? Regular computer vision may be adequate depending on your data eg if its well scanned and just black and white it may be fairly trivial to find all black areas that are squares of a certain size and which of those contain more filled pixels than others for example.

That being said if you do want to use machine learning you will probably want to retrain some sort of object detection model to find objects of interest and their positions eg a filled box vs an unfilled box etc.
For that I highly recommend following this great tutorial by Hugo:

  
      

      blog.tensorflow.org
  

  
    

Custom object detection in the browser using TensorFlow.js

  Train a custom MobileNetV2 using the TensorFlow 2 Object Detection API and Google Colab for object detection, convert the model to TensorFlow.js


  

  
    
    
  

  


You can then run that resulting trained model in the browser to detect custom objects like you need and find their locations in the given image.