Comments (2)
Hi,
the EIPH_WSI dataset is currently not publicly available. Please, use for example the COCO_SAMPLE dataset.
With kind regards,
Christian
from objectdetection.
Take a look at the example code below for inspiration.
CATEGORIES = []
for i in range(5):
CATEGORIES += {
'id': str(i),
'name': str(i),
'supercategory': 'Hemosiderophages',
},
coco_output = {
# "info": INFO,
# "licenses": LICENSES,
"categories": CATEGORIES,
"images": [],
"annotations": []
}
image_id = 1
annotation_id = 1
path = Path('/data/Datasets/)
# for each file to convert into the coco format
for file in tqdm(train_files):
# get boxes and labels in the format [[x1,x2,w,h], [x1,x2,w,h]], [1,2]
boxes, labels = get_y_func(file)
boxes = np.array(boxes)
labels = np.array(labels)
classes = list(set(labels))
for image, y in zip(x_batch, y_batch):
boxes, labels = y
name = file.file.stem + "_" + str(image_id) + ".png"
image_info = {
"id": image_id,
"file_name": name,
"width": image.shape[0],
"height": image.shape[1],
}
coco_output["images"].append(image_info)
for box, label in zip(boxes, labels):
annotation_info = {
"id": annotation_id,
"image_id": image_id,
"category_id": str(label),
"bbox": [int(box[0]), int(box[1]), int(box[2]-box[0]), int(box[3]-box[1])]
}
coco_output["annotations"].append(annotation_info)
annotation_id = annotation_id + 1
image_id += 1
with open(str(path/'WIPH_WSI_Coco.json'), 'w') as output_json_file:
json.dump(coco_output, output_json_file)
from objectdetection.
Related Issues (20)
- No module name BoundingBox HOT 1
- size problem
- Inference Error HOT 8
- Fastai V2
- Anchors are totally wrong HOT 2
- In examples, incorrect anchors preview
- Exception: It's not possible to apply those transforms to your dataset HOT 5
- Validation scores
- Prediction Example HOT 2
- Index Error when using Transfer Learning HOT 1
- Migrating ObjectDetection to FastAIv2 HOT 2
- Error in NMS function
- any script to get prediction on single .scn file with coco .json annotations
- How to change number of classes for already trained retinanet model HOT 3
- How can i get the predicted classes from my retinanet model detection over the images.
- How to use fastai v2 for this library HOT 1
- How to save the image patches that are created from databunch method?
- Requesting object detection for fastai v2 HOT 1
- mAP seems to be [email protected] not mAP value
- Any script to train the model ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objectdetection.