Open-MMLab and MM Detection Toolbox - Questions on Video and Tutorial for RoboFlow and RTM Detect

Describe your question/issue here! (delete this when you post)

Project: Graduate Student at Arizona State - PhD in Data Science
Topic: MM Detection Toolbox and Use of RoboFlow in Tutorial
Questions on Setup with Training and Testing

Hi,
My name is Manuel Steele. I found this great link and have questions. This link is more recent in context with updated code.

The link has minor differences with an older tutorial provided by the toolbox parent branch at this link. I think this one is outdated.

Question 1: I am trying to use the Swin backbone for detection/localization. For (1)-(3), what are modern dependency versions for use in October of 2024? Why use mmcv instead of mmcv-full?
(1) !mim install -q “mmengine>=0.6.0”
(2) !mim install -q “mmcv>=2.0.0rc4,<2.1.0”
(3) !mim install -q “mmdet>=3.0.0rc6,<3.1.0”

Question 2: For swin, I think I have to git clone the main detection branch and apply the Swin Model from within that git project?
cd {HOME}/mmyolo

Question 3: Why are these commands used below? It confuses me.
!python tools/train.py configs/rtmdet/custom.py
CUSTOM_WEIGHTS_PATH = f"/content/mmyolo/work_dirs/custom/epoch_{MAX_EPOCHS}.pth"

Question 4: Is it possible to use MM Toolbox on a home desktop with a GPU? Or is Google Colab best to use?

In summary, I have tried to setup the MM Toolbox on my home desktop. When I installed MMCV-full, issues happened in trying to run the Swin Toolbox. I had to resort to some solutions like installed mmcv for a lower version instead of mmcv-full. Your feedback will help.

I am working on a project for CSE 507 - a course on medical image processing with PyTorch.
Manuel Steele
ASU PhD Student - Data Science

Hi Manuel,

Unfortunately you’ve stumbled upon an issue that’s been plaguing us for a while - MM stack support. Among us, it is known as something that’s notoriously hard to set up. I don’t have first-hand experience, but I’ll try to answer as best as I can.

  1. We don’t have info on a set of modern compatible dependencies. As for the packages, the 2.0 mmcv release notes say:

renamed the package name mmcv to mmcv-lite and mmcv-full to mmcv in PR #2235

  1. I don’t think we’ve dealt with Swin before, but your proposal doesn’t sound out of the ordinary.

  2. MMYolo provides a configuration file defining the model structure and parameters. Reading the folded sections of our Colab, it seems to be referring to this file. Custom weights refer to previously trained weights, likely for fine-tuning. Max epochs simply says it’s the last-trained ones.

  3. It’s possible, but hard to tell which is easier. Colab comes with a set of preinstalled libraries - you can run pip freeze in an empty environment, and something similar for system libraries with !apt list --installed (probably). On your machine, you may need to set them up yourself, but if there’s dependency issues, they might be easier to resolve.

Ultimately, I don’t have a good answer to your problems, but hope my response proves at least somewhat helpful. Best of luck!

After massive debugging with help from a TA, I gave up on MM Toolbox. I feel the tutorial notebooks for setup are too outdated. The cross-referencing across different branches of git forks is also missing but is actually necessary to understand. In summary, there is too much reverse-engineering of processes and dependencies.

Opinion: I am a software engineer with 24+ years of experience. Problem 1: technical writing is unpopular and often lacking among programmers. I think the MM Toolbox is a prime example of that. Problem 2: In academia, the scientific programmers often code in such a way that the knowledge transfer is not as efficient as it could be. For example, in that course of CSE 507 for medical imaging with Pytorch, most students present the model with results. None of them show the inner details of software engineering with object-oriented design, ETL (extract, transform, and load), and code metrics for software engineers like cyclomatic complexity, number of lines of code, etc. They don’t use something like SonarQube. And none of them have proper software requirements with design details defined before developing. In summary, they just read a journal with model, present the model, then results.

By contrast, the Facebook Detectron2 was much easier to setup with updated references. I got it to work and am putting up my results together in a ppt. Facebook is a professional software engineering entity in the working world, and it shows. They are not scientific programmers but professional software developers. It is clear they properly defined requirements, did code metrics, unit testing, integration testing, etc. And their tutorial notebooks are up-to-date.

Another good choice I found is “FiftyOne”. MM Toolbox is far too large and improperly maintained. But FiftyOne is lightweight and easy to install. It does segmentation and localization very quickly with great documentation.

In summary, I gave up on MM Toolbox. I was successful with Detectron2 and see even easier implementation with FiftyOne. I recommended the latter two toolboxes to my fellow graduate students in CSE 507 for medical image processing with Pytorch/CNN.

Thank you for responding.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.