Coding Period Week 7(19th July — 26th July )

Saksham Gautam
3 min readJul 25, 2023

--

Goals of this week-:

  1. The main goal is to setup the Singularity container and utilize the GPU
  2. Resolve memory issue in hider.
  3. Test RetinaFace on some low quality images and evaluate the results with MTCNN.

Progress-:

  1. This week started with setting up the singularity container. With some hurdles I was able to setup the singularity container.
    The main hurdle that I faced was accessing the GPU within singularity container.While I was able to utilize GPU outside the container but due to certain library incompatibilities the GPU was not detected inside the container.
    Initially, I attempted to create the container using a basic Ubuntu Docker image. However, I soon realized that installing all the necessary libraries for GPU compatibility was arduous and not recommended. Instead, the best approach was to find a pre-existing Docker image that met our requirements.
    For RHA, we need tensorflow and pytorch in the same environment. Though there are many images available online, but most of them either have tensorflow or pytorch. So I used an image for pytorch with GPU support and installed all the dependencies in it. And yes it worked fine!
    Summary of how to use cluster-:
    i. Build a singularity container on your local machine.(Refer this )
    ii. Transfer it to the hpc server and store it in your home directory
    iii. Schedule a job(refer this). There are two types of jobs that you can schedule — interactive and batch jobs.
    iii. Load all the modules required according to your needs(Refer this)
    iv. Transfer your files to /scratch directory(Refer this)
    vi. Run your Singularity container. You have the option to run it interactively or modify the runscript to execute it without entering the container.
    v. Your setup is complete and you are good to go.
    For scheduling batch jobs, ensure that your program is containerized to automatically run within the container. It should automatically run when you run a container. This can be done by modifying the runscript.

2. After setting up the singularity container, next issue was to debug hider. Resolving this bug will allow us to process the videos of theoretically any duration and resolution. To ensure that the issue was due to memory leakage I monitored the resources utilized by the jobs. Following command is quite helpful.

seff <Job-id>

3. The memory leakage was due to the usage of predict function in MTCNN.(details). The fixed implementation can be found at this.

4. Next target of this week was to test RetinaFace on some very low quality images. Comparing the results of MTCNN and RetinaFace, Retina Face seems more robust in some cases. Here are some of the images — :

Detection by MTCNN
Detection by RetinaFace

I shared these results with the mentors. In the next meeting we are going to discuss if we should include RetinaFace as another feature or should we start working on web development.
Before jumping to web development, I am planning to modify the runscript of the container so that we can easily schedule batch jobs in case we want to test large number of videos.

5. The mid-term evaluation has also started this week. It is a simple 5–10 minutes quiz in which general question related to the mentors and organization is asked.

--

--