Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNlp committed Oct 6, 2023
1 parent 2cdeafb commit d2d6b5a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ Firstly, the image go trough a longest stride resize and is normalized. Then the
![Pre processing pipe](./docs/images/preprocessing_pipeline.png)
*Simplified preprocessing pipeline*

Note: Normalization and reshape to 1024x1024 of the image is done in:
```
/src/segment_anything/modeling/sam.py
```
Hence, the Samprocessor only need to do the longest stride resize and transform the coordinates of the bounding box.
## Dataloader
```
/src/dataloader.py
Expand All @@ -142,12 +137,18 @@ I added 2 keys:
```
/src/processor.py
```

In the dataloader, the processor (Samprocessor class) tranforms the image and prompt so that both are prepared for the image encoder and prompt encoder. It will output the dictionnary containing the keys image, boxes and prompt.

Note: Normalization and reshape to 1024x1024 of the image is done in:
```
/src/segment_anything/modeling/sam.py
```
Hence, the Samprocessor only need to do the longest stride resize and transform the coordinates of the bounding box.

![Processor inside](./docs/images/processor_inside.png)
*Simplified processor transformation applied to an image and a prompt*


# Metrics
To train and test the model performances on the test set, I used the Dice Loss. By computing the dice loss, we have access to the Dice Similarity Coefficient (DSC) by doing: Dice coeff = 1 - Dice Loss.

Expand Down

0 comments on commit d2d6b5a

Please sign in to comment.