{
"followers": 24,
"created_at": "2018-06-19",
"updated_at": "2025-07-24",
"following": 144,
"blog": "https://qiita.com/yuki-inaho",
"github_username": "yuki-inaho",
"public_gists": 15,
"public_repos": 193,
"bio": "I may not respond to issues quickly. \r\n\r\nPlease send me a message via Twitter if necessary.",
"location": "Japan",
"company": "inaho Inc.",
"linkedin_username": "yuki-yoshikawa-b5004891",
"work_email": "yoshikawa@inaho.co",
"company_name": "inaho",
"title": "設計エンジニア",
"country": "japan",
"full_name": "Yuki Yoshikawa",
"last_name": "Yoshikawa",
"first_name": "Yuki",
"emails": [
"yoshikawa@inaho.co"
],
"email": "yoshikawa@inaho.co",
"x_username": "inaho_yuki",
"id": 40379474,
"names": [
"yuki yoshikawa"
],
"stars": [
{
"starred_at": "2025-02-08",
"repo": {
"full_name": "dkurt/openvino_pytorch_layers",
"issues_count": 3,
"size": 87,
"id": 286417941,
"default_branch": "master",
"description": "How to export PyTorch models with unsupported layers to ONNX and then to Intel OpenVINO",
"stargazers_count": 27,
"open_issues_count": 3,
"archived": true,
"forks_count": 12,
"language": "C++",
"updated_at": "2025-02-18",
"name": "openvino_pytorch_layers",
"topics": [
"custom",
"fft",
"intel",
"intel-openvino",
"model-optimizer"
],
"homepage": "https://github.com/openvinotoolkit/openvino",
"created_at": "2020-08-10",
"owner": {
"login": "dkurt",
"type": "user",
"id": 25801568
}
}
},
{
"starred_at": "2025-04-19",
"repo": {
"full_name": "roocodeinc/roo-code",
"issues_count": 441,
"size": 111894,
"id": 881506708,
"default_branch": "main",
"description": "Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.",
"stargazers_count": 17616,
"open_issues_count": 441,
"forks_count": 1950,
"language": "TypeScript",
"updated_at": "2025-07-29",
"name": "roo-code",
"homepage": "https://roocode.com",
"created_at": "2024-10-31",
"fork": true,
"owner": {
"login": "roocodeinc",
"type": "organization",
"id": 211522643
}
}
}
],
"repos": [
{
"id": 1012515436,
"name": "alltracker",
"full_name": "yuki-inaho/alltracker",
"description": "AllTracker is a model for tracking all pixels in a video.",
"language": "Python",
"created_at": "2025-07-02",
"updated_at": "2025-07-02",
"stargazers_count": 0,
"forks_count": 0,
"open_issues_count": 0,
"issues_count": 0,
"archived": false,
"default_branch": "master",
"size": 370,
"fork": true,
"homepage": "https://alltracker.github.io/",
"owner": {
"login": "yuki-inaho",
"type": "user",
"id": 40379474
}
}
],
"follower_accounts": [
{
"login": "district10",
"type": "user",
"id": 5262037
}
],
"following_accounts": [
{
"login": "takuma104",
"type": "user",
"id": 10776
}
],
"issues": [
{
"issue_id": 2853038275,
"raised_by": "yuki-inaho",
"actor_id": 40379474,
"actor_type": "user",
"date": "2025-02-14",
"updated_at": "2025-02-14",
"link": "https://github.com/lyuwenyu/RT-DETR/issues/550",
"title": "Inconsistency between feature_info layer names and PyTorch child module names causes IntermediateLayerGetter error when using the timm-based HGNetv2 through TimmModel",
"message": "Inconsistency between feature_info layer names and PyTorch child module names causes IntermediateLayerGetter error when using the timm-based HGNetv2 through TimmModel\n## Overview\n\nWhen creating a model via `timm.create_model(...)`, `model.feature_info.module_name()` returns layer names in a dot notation such as `\"stages.0\"`, `\"stages.1\"`. However, PyTorch’s `named_children()` for the same model yields underscore notation like `\"stages_0\"`, `\"stages_1\"`.\n\n`IntermediateLayerGetter` relies on `named_children()`, meaning if a user specifies `return_layers=[\"stages.0\", \"stages.1\", ...]` (following dot notation from timm’s feature_info), PyTorch cannot find the corresponding modules (which are actually named `\"stages_0\"`, etc.) and raises the following error:\n\n```\nValueError: return_layers are not present in model. ['stem', 'stages_0', 'stages_1', 'stages_2', 'stages_3']\n```\n\nFrom this message, I can see that `IntermediateLayerGetter` is looking for `\"stages_0\"`, but timm’s feature info suggests the user should use `\"stages.0\"`. This mismatch leads to a conflict.\n\n---\n\n## Steps to Reproduce\n**Commit:** `df742232c6e046e763e57573a78039828f19fb6b`\n\n1. Create a `TimmModel` instance that internally calls `timm.create_model(...)` and check the module names for the return layers. \n2. Pass `return_layers` containing the layer names as returned by `model.feature_info.module_name()` (e.g., `\"stages.0\"`). \n3. `IntermediateLayerGetter` references `named_children()` under the hood, which cannot find `\"stages.0\"`. This raises a `ValueError`.\n\n**Example code:**\n\n```python\n# Sample code\nimport sys\nsys.path.append(\"RT-DETR/rtdetrv2_pytorch\")\n\nimport timm\nfrom src.nn.backbone.timm_model import TimmModel\n\nmodel_timm_hgnetv2 = timm.create_model(\"hgnetv2_b4.ssld_stage2_ft_in1k\", pretrained=False, features_only=True)\nmodel_timm_hgnetv2 = model_timm_hgnetv2.eval()\nfor i, info in enumerate(model_timm_hgnetv2.feature_info):\n print(f\"Index {i}: Module {info['module']} - Channels: {info['num_chs']}, Reduction: {info['reduction']}\")\n# Index 0: Module stages.0 - Channels: 128, Reduction: 4\n# Index 1: Module stages.1 - Channels: 512, Reduction: 8\n# Index 2: Module stages.2 - Channels: 1024, Reduction: 16\n# Index 3: Module stages.3 - Channels: 2048, Reduction: 32\n\nmodel_timm = TimmModel(\n name=\"hgnetv2_b4.ssld_stage2_ft_in1k\",\n return_layers=[\"stages.0\", \"stages.1\", \"stages.2\", \"stages.3\"],\n features_only=True,\n)\n\n# Traceback (most recent call last):\n# File \"/home/yuki-inaho/Project/rt-detr_sandbox/test.py\", line 16, in <module>\n# model_timm = TimmModel(\n# File \"/home/yuki-inaho/Project/rt-detr_sandbox/RT-DETR/rtdetrv2_pytorch/src/nn/backbone/timm_model.py\", line 42, in __init__\n# self.model = IntermediateLayerGetter(model, return_layers)\n# File \"/home/yuki-inaho/Project/rt-detr_sandbox/RT-DETR/rtdetrv2_pytorch/src/nn/backbone/utils.py\", line 32, in __init__\n# raise ValueError(\"return_layers are not present in model. {}\"\\\n# ValueError: return_layers are not present in model. ['stem', 'stages_0', 'stages_1', 'stages_2', 'stages_3']\n#\n# from:\n# https://github.com/lyuwenyu/RT-DETR/blob/b8957b30431abc938db16016f6b5e395b562c5dd/rtdetrv2_pytorch/src/nn/backbone/utils.py\n```\n\nAs explained, PyTorch sees `\"stages_0\"` while timm returns `\"stages.0\"`, causing a naming mismatch.\n\n---\n\n## Possible Fix\n\n### 1. Provide a mapping to convert dot notation to underscore notation\n\nHere’s an example fix: \nCreate a dictionary to replace timm’s feature_info layer names (`\"stages.0\"` etc.) with PyTorch’s underscore names (`\"stages_0\"`) before passing them to `IntermediateLayerGetter`.\n\n```diff\n+++ rtdetrv2_pytorch/src/nn/backbone/timm_model_copy.py\t2025-02-14 17:38:21.648183784 +0900\n@@ -37,9 +37,23 @@\n \n assert set(return_layers).issubset(model.feature_info.module_name()), \\\n f'return_layers should be a subset of {model.feature_info.module_name()}'\n- \n+\n+ # Create a mapping to replace layer names written in feature_info with layer names in PyTorch\n+ feature_to_child_map = {}\n+ for m_name in model.feature_info.module_name():\n+ # Example: 'stages.0' -> 'stages_0'\n+ # 'stages.1' -> 'stages_1' ...\n+ mapped_name = m_name.replace(\".\", \"_\")\n+ feature_to_child_map[m_name] = mapped_name\n+\n+ # Replace 'stages.0', 'stages.1', etc. in the received return_layers\n+ # with 'stages_0', 'stages_1', etc. and pass them to IntermediateLayerGetter\n+ new_return_layers = []\n+ for layer in return_layers:\n+ new_return_layers.append(feature_to_child_map[layer])\n+\n # self.model = model\n- self.model = IntermediateLayerGetter(model, return_layers)\n+ self.model = IntermediateLayerGetter(model, return_layers=new_return_layers)\n \n return_idx = [model.feature_info.module_name().index(name) for name in return_layers]\n self.strides = [model.feature_info.reduction()[i] for i in return_idx]\n```\n\nBy using the new mapping, `TimmModel` can accept `[\"stages.0\", \"stages.1\"]` and internally convert them to `[\"stages_0\", \"stages_1\"]`, thus eliminating the error.\n\n---\n\n## Background\n\nI are using RT-DETR with an HGNetv2 backbone. timm provides pretrained HGNetv2 which could be conveniently reused for weight initialization and module structures. During experimentation, I discovered that timm’s HGNetv2 returns dotted layer names (e.g. `\"stages.0\"`), conflicting with PyTorch’s underscore names (`\"stages_0\"`) in `IntermediateLayerGetter`.\n\nBy applying the patch above, I managed to train RT-DETR successfully with timm-based HGNetv2 using a config like:\n\n```yaml\n__include__:\n [\n \"../dataset/coco_detection.yml\",\n \"../runtime.yml\",\n \"./include/dataloader.yml\",\n \"./include/optimizer.yml\",\n \"./include/rtdetrv2_r50vd.yml\",\n ]\n\noutput_dir: ./output/rtdetrv2_hgnetv2_l_6x_coco\n\nRTDETR:\n backbone: TimmModel\n\nTimmModel:\n name: \"hgnetv2_b4.ssld_stage2_ft_in1k\"\n return_layers: [\"stages.1\", \"stages.2\", \"stages.3\"]\n pretrained: True\n exportable: True\n features_only: True\n\noptimizer:\n type: AdamW\n params:\n - params: \"^(?=.*backbone)(?!.*norm|bn).*$\"\n lr: 0.000005\n - params: \"^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn)).*$\"\n weight_decay: 0.\n\n lr: 0.0001\n betas: [0.9, 0.999]\n weight_decay: 0.0001\n```\n\nI hope this information helps others.",
"type": "issue",
"description": "Description of the issue",
"issue_number": 550,
"status": "Open",
"author_association": "NONE",
"repo": {
"full_name": "lyuwenyu/rt-detr",
"issues_count": 387,
"size": 649,
"id": 638806609,
"default_branch": "main",
"description": "[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥 ",
"stargazers_count": 3953,
"open_issues_count": 387,
"forks_count": 455,
"language": "Python",
"updated_at": "2025-07-29",
"name": "rt-detr",
"topics": [
"rtdetr",
"rtdetrv2"
],
"created_at": "2023-05-10",
"owner": {
"login": "lyuwenyu",
"type": "user",
"id": 17582080
}
},
"comment_count": 0
},
{
"issue_id": 2361239585,
"raised_by": "yuki-inaho",
"actor_id": 40379474,
"actor_type": "user",
"date": "2024-06-19",
"updated_at": "2024-06-19",
"closed_at": "2024-06-19",
"link": "https://github.com/yuki-inaho/dbscan-python/pull/1",
"title": "Hotfix/memory leaks 42e1e71",
"message": "Hotfix/memory leaks 42e1e71\nNone",
"type": "pull_request",
"description": "Description of the issue",
"issue_number": 1,
"status": "Closed",
"author_association": "OWNER",
"repo": {
"full_name": "yuki-inaho/dbscan-python",
"size": 326,
"id": 817093081,
"default_branch": "master",
"description": "Theoretically Efficient and Practical Parallel DBSCAN",
"stargazers_count": 1,
"language": "C++",
"updated_at": "2025-04-24",
"name": "dbscan-python",
"homepage": "https://sites.google.com/view/yiqiuwang/dbscan",
"created_at": "2024-06-19",
"fork": true,
"owner": {
"login": "yuki-inaho",
"type": "user",
"id": 40379474
}
},
"comment_count": 0,
"merged_at": "2024-06-19T04:23:49Z"
},
{
"issue_id": 1331314833,
"raised_by": "yuki-inaho",
"actor_id": 40379474,
"actor_type": "user",
"date": "2022-08-08",
"updated_at": "2022-08-23",
"closed_at": "2022-08-23",
"link": "https://github.com/wjakob/nanobind/issues/57",
"title": "Suspectable lines on tests/test_tensor.cpp ?",
"message": "Suspectable lines on tests/test_tensor.cpp ?\nThank you for your great job. I'm enjoying your tools as combining the OpenCV framework like below repository.\r\nIt seems a very kind and sophisticated tool at least for me.\r\nhttps://github.com/yuki-inaho/nanobind_opencv_exercise\r\n\r\n\r\n## Suspectable lines (for me)\r\nI noticed below code lines (especially the 83-th line) on the test code are a little suspectable for me.\r\nTo be exact, ``` size_t x = 0; x < tensor.shape(1); ++x ``` will be correct.\r\nPlease sorry if something is wrong, thank you.\r\n\r\nhttps://github.com/wjakob/nanobind/blob/43a96c537824b4a8b5202e166c1bff239a7e547e/tests/test_tensor.cpp#L79-L87",
"type": "issue",
"description": "Description of the issue",
"issue_number": 57,
"status": "Closed",
"author_association": "NONE",
"repo": {
"full_name": "wjakob/nanobind",
"name": "nanobind"
},
"comment_count": 1,
"state_reason": "completed"
}
],
"events": [
{
"date": "2025-07-24",
"type": "watch",
"message": "Started watching mind-inria/picard",
"action": "started",
"repo": {
"full_name": "mind-inria/picard",
"issues_count": 3,
"size": 11389,
"id": 95392316,
"default_branch": "master",
"description": "Preconditioned ICA for Real Data",
"stargazers_count": 113,
"open_issues_count": 3,
"forks_count": 15,
"language": "Python",
"updated_at": "2025-07-24",
"name": "picard",
"topics": [
"independent-component-analysis"
],
"homepage": "https://mind-inria.github.io/picard/",
"created_at": "2017-06-25",
"owner": {
"login": "mind-inria",
"type": "organization",
"id": 118902559
}
},
"org_login": "mind-inria",
"link": "https://github.com/mind-inria/picard",
"actor_login": "yuki-inaho",
"actor_id": 40379474
},
{
"date": "2025-07-21",
"type": "watch",
"message": "Started watching gadomski/cpd-rs",
"action": "started",
"repo": {
"full_name": "gadomski/cpd-rs",
"size": 56,
"id": 111423504,
"default_branch": "master",
"description": "Coherent Point Drift, rust edition",
"stargazers_count": 1,
"archived": true,
"forks_count": 1,
"language": "Rust",
"updated_at": "2025-07-21",
"name": "cpd-rs",
"created_at": "2017-11-20",
"owner": {
"login": "gadomski",
"type": "user",
"id": 58314
}
},
"link": "https://github.com/gadomski/cpd-rs",
"actor_login": "yuki-inaho",
"actor_id": 40379474
}
],
"skills": [
{
"score": 1.67,
"skill": "python"
}
],
"avatar_url": "https://avatars.githubusercontent.com/u/40379474?v=4",
"x_url": "x.com/inaho_yuki",
"linkedin_url": "linkedin.com/in/yuki-yoshikawa-b5004891",
"github_url": "github.com/yuki-inaho"
}