File size: 2,426 Bytes
3aac657
02f91fb
 
3aac657
1ac2a5b
3aac657
 
 
 
 
 
 
df26f80
1b4cee0
 
 
 
 
 
 
 
3aac657
 
1b4cee0
 
 
 
3aac657
 
 
1b4cee0
 
 
73fee5f
 
 
 
 
 
 
 
 
 
1b4cee0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73fee5f
 
 
 
 
 
 
 
 
 
 
 
 
 
3aac657
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
title: YOLOv8-TO Demo
emoji: 🏗️
colorFrom: yellow
colorTo: green
sdk: gradio
app_file: app.py
pinned: false
---


# YOLOv8-TO
Code for the article "From Density to Geometry: YOLOv8 Instance Segmentation for Reverse Engineering of Optimized Structures"

## Table of Contents
- [Overview](#overview)
- [Reference](#reference)
- [Installation](#installation)
  - [Prerequisites](#prerequisites)
  - [Installing](#installing)
- [Datasets](#datasets)
- [Training](#training)
- [Inference](#inference)

## Overview
Brief description of what the project does and the problem it solves. Include a link or reference to the original article that inspired or is associated with this implementation.

## Demo
Try it at:

##  Reference
This code aims to reproduce the results presented in the research article:

```bibtex
@misc{rochefortbeaudoin2024density,
      title={From Density to Geometry: YOLOv8 Instance Segmentation for Reverse Engineering of Optimized Structures}, 
      author={Thomas Rochefort-Beaudoin and Aurelian Vadean and Sofiane Achiche and Niels Aage},
      year={2024},
      eprint={2404.18763},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
```
## Installation

### Prerequisites
This package comes with a fork of the ultralytics package in the yolov8-to directory. The fork is necessary to add the functionality of the design variables regression.

### Installing

```bash
git clone https://github.com/COSIM-Lab/YOLOv8-TO.git
cd YOLOv8-TO
pip install -e .
```
## Datasets
Links to the dataset on HuggingFace:
- [YOLOv8-TO_Data](https://huggingface.co/datasets/tomrb/yolov8to_data)

The Huggingface dataset contains the following datasets (see paper for details):
- MMC
- MMC-random
- SIMP
- SIMP_5%
- OOD


If you want to use one of the linked datasets, please unzip it inside of the datasets folder. Training labels are provided for the MMC and MMC-random data. To train on the data, please update the data.yaml file with the correct path to the dataset.
```yaml
path:  # dataset root dir
```


## Training

To train the model, make sure the train dataset is setup according to the above section and according to the documentation from ultralytics:
https://docs.ultralytics.com/datasets/

Refer to the notebook `YOLOv8_TO.ipynb` for an example of how to train the model.

## Inference
Refer to the notebook `YOLOv8_TO.ipynb` for an example of how to perform inference with the trained model.