跪拜 Guibai
← All articles
Algorithms

Training RF-DETR on SeaShips: GitLab Token Cloning, VOC-to-YOLO Conversion, and Checkpoint Resumption

By 勾勾圈圈蛋蛋 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

RF-DETR's directory naming convention ("valid" not "val") and the `resume` parameter name are undocumented tripwires that will silently break a training pipeline. Embedding tokens in Git URLs is a practical workaround when credential helpers fail, but the cleanup steps are essential to avoid leaking secrets.

Summary

Cloning from a GitLab instance that blocks password authentication requires embedding a Personal Access Token directly in the clone URL, bypassing credential helper socket issues. The log details a security cleanup sequence afterward: purging the relevant shell history entries and resetting the remote URL to strip the token. The SeaShips(7000) dataset ships in Pascal VOC format, so every bounding box gets normalized to YOLO's class_id and center-width-height representation, with the directory structure using "valid" instead of "val" to satisfy RF-DETR's expectations. Training runs through the RFDETRMedium model class, which auto-downloads weights, and progress is monitored via nvidia-smi and tailing the metrics CSV. DETR's Transformer architecture and Hungarian matching make it 3-5x slower than YOLO, and co-located vLLM or Ollama processes further eat into available VRAM. When a run is interrupted, the `resume` parameter points to the latest checkpoint file to continue from where it stopped.

Takeaways
GitLab instances that disable password login require a Personal Access Token with read_repository scope, embedded directly in the clone URL to bypass credential helper socket problems.
After cloning with an embedded token, immediately purge the shell history and reset the remote URL to remove the token.
Pascal VOC bounding boxes convert to YOLO format by normalizing x_center, y_center, width, and height to the image dimensions.
RF-DETR requires the validation directory to be named "valid", not "val".
RFDETRMedium() auto-downloads pretrained weights to ~/.roboflow/models/ on first use.
Resuming training uses the `resume` parameter pointing to a .ckpt file, not `ckpt_path`.
DETR-based models train 3-5x slower than YOLO due to Transformer architecture and Hungarian matching, and GPU memory contention from other services like vLLM compounds the slowdown.
Conclusions

Small API surface mismatches like `valid` vs `val` or `resume` vs `ckpt_path` are the kind of silent failures that eat hours in ML workflows, and the documentation rarely calls them out explicitly.

The habit of asking AI about dangers before executing a command — rather than just asking for the next step — shifts the interaction from a tutorial generator to a safety check, which is a more defensible pattern for production work.

Concepts & terms
Pascal VOC format
An XML-based annotation format where each object is described by its class name and bounding box coordinates (xmin, ymin, xmax, ymax) in pixel values.
YOLO format
A text-based annotation format where each line contains a class ID and normalized bounding box coordinates (x_center, y_center, width, height) scaled to the range 0-1.
Hungarian matching
An algorithm used in DETR-based object detectors to find the optimal one-to-one assignment between predicted bounding boxes and ground-truth boxes during loss computation, contributing to slower training compared to YOLO's grid-based assignment.
From the discussion

The conversation veers sharply from the article's technical content into personal reflection and practical advice. A privacy reminder cuts through the introspection, warning against exposing real IPs and project names in public logs. The remaining contributions wrestle with career anxiety, the role of AI, and the motivations for learning in public, with a long personal essay arguing that passion for code and proximity to technological change matter more than immediate job-market outcomes.

Writing on Juejin serves as public study notes and a motivational alternative to private tools like Obsidian, valued for its clean interface and low barrier to entry.
Publicly shared technical logs must sanitize sensitive details such as host IPs, project names, and file paths to prevent information leaks.
AI's current limitations in niche tasks do not disprove its potential to solve genuinely unsolved problems, a belief supported by past scientific breakthroughs using models.
Severe pre-graduation anxiety and recruitment setbacks do not equate to a failed life or career; the intrinsic enjoyment of programming and a desire to stay close to technological frontiers provide a sustaining sense of purpose.
Featured comments
勾勾圈圈蛋蛋

Pay attention to privacy and data masking... replace the IP with a placeholder like <gitlab-host>, the project name with your-project, and the path with /opt/datasets/ or similar generic names.

勾勾圈圈蛋蛋

I'm 21 this year, one year left until graduation. The autumn recruitment season is upon me, but anxiety has left me unable to prepare. Yet I've finally written my first Juejin article. The summer was a huge blow; I thought about changing careers, thought some dark thoughts. But yesterday a good friend said, 'I feel like life is just beginning,' which gave me a sliver of hope in an otherwise bleak future. Does failing to get into a mid-sized or large company in the autumn recruitment, or not having mastered development skills yet, mean my whole life is a failure? Seeing Beef Bro's Xiaohongshu post today, it coincidentally aligned with my own reflections: both saying 'not getting into a big company doesn't mean a failed life.' I remember why I chose computer science for the college entrance exam: a person like me can do anything and get by; but since one has to work their whole life, spending it facing code is more fun than other things. And I want to make games. I remember why I transferred majors to study computer science. Eating in the Yujiatou cafeteria, I saw a roughly 10-second cyber-city video generated by Sora for the first time. I thought then: am I going to spend my life disconnected from the cutting edge of this era? I want to be closer to the times. So there wasn't much difficulty; I wanted to transfer, and I succeeded. The two wasted years that followed, just getting by in school and slowly getting by with myself, not developing interests, diving deep into tech, or planning a career, led to today's situation. I won't dwell on it; regret is useless. Do you like being a programmer? I want to say, even after experiencing over a dozen failed interviews this summer, I still like it. One has to work their whole life; spending it facing code is more interesting than doing other things. What a rare thing that is! I used to hate AI a bit, for making job hunting so annoying this year and making me have to learn so much. But thinking about my 'original intention,' I'm still hopeful. Maybe one day I really can make indie games and do more fun things; I can self-study and learn so much. Psychology, finance, simulating a cat's life. Through AI and technology, I can do many, many things that break down barriers of time cost and technical cost. Aren't you already very close to the tide of the times? You sought benevolence and received it—what is there to complain about?

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗