Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guyettinger/gle-pascal-voc
A library for working with Pascal Visual Object Classes (VOC) Annotations
https://github.com/guyettinger/gle-pascal-voc
pascal-voc pascal-voc-xml typescript
Last synced: about 6 hours ago
JSON representation
A library for working with Pascal Visual Object Classes (VOC) Annotations
- Host: GitHub
- URL: https://github.com/guyettinger/gle-pascal-voc
- Owner: guyettinger
- License: mit
- Created: 2023-11-10T04:09:37.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-01T00:43:22.000Z (11 months ago)
- Last Synced: 2024-08-09T16:36:05.062Z (3 months ago)
- Topics: pascal-voc, pascal-voc-xml, typescript
- Language: TypeScript
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GLE Pascal VOC
A library for working with Pascal Visual Object Classes (VOC) Annotations[![Version](https://img.shields.io/npm/v/gle-pascal-voc?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gle-pascal-voc)
[![Downloads](https://img.shields.io/npm/dt/gle-pascal-voc.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gle-pascal-voc)## Installation
```shell
npm install gle-pascal-voc
```## Usage
```typescript
const pascalVocModel = new PascalVocModel(
'Image Folder',
'Image.jpg',
'/annotations/Image.jpg',
new SourceModel(),
new SizeModel(100, 100, 3),
Segmented.Linear,
[
new ObjectModel(
'person',
'Unspecified',
Truncated.FullyVisible,
Difficult.Easy,
new BoundingBoxModel(1, 1, 99, 99),
[
new PartModel(
'hand',
new BoundingBoxModel(25, 25, 50, 50)
),
new PartModel(
'hand',
new BoundingBoxModel(50, 25, 99, 99)
)
],
new ActionsModel(new Map([
['other', 1],
['jumping', 0],
['phoning', 1],
['playinginstrument', 0],
['reading', 1],
['ridingbike', 0],
['ridinghorse', 1],
['running', 0],
['takingphoto', 1],
['usingcomputer', 0],
['walking', 0],
])),
),
new ObjectModel(
'person',
'Unspecified',
Truncated.FullyVisible,
Difficult.Easy,
new BoundingBoxModel(1, 1, 99, 99),
[
new PartModel(
'hand',
new BoundingBoxModel(25, 25, 50, 50)
),
new PartModel(
'hand',
new BoundingBoxModel(50, 25, 99, 99)
)
],
new ActionsModel(new Map([
['other', 1],
['jumping', 0],
['phoning', 1],
['playinginstrument', 0],
['reading', 1],
['ridingbike', 0],
['ridinghorse', 1],
['running', 0],
['takingphoto', 1],
['usingcomputer', 0],
['walking', 0],
])),
)
]
)
const xml = toXML.pascalVOCToXML(pascalVocModel)
console.log(xml)
```
```xmlImage Folder
Image.jpg
100
100
3
0
person
Unspecified
0
0
1
1
99
99
hand
25
25
50
50
hand
50
25
99
99
1
0
1
0
1
0
1
0
1
0
0
person
Unspecified
0
0
1
1
99
99
hand
25
25
50
50
hand
50
25
99
99
1
0
1
0
1
0
1
0
1
0
0
```
## Development
Install
```
npm install
```
Build Library
```
npm run build
```
Run Tests
```
npm run test
```