Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion instill/helpers/init-templates/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN for package in ${SYSTEM_PACKAGES}; do \

ARG PACKAGES
RUN for package in ${PACKAGES}; do \
pip install --default-timeout=1000 --no-cache-dir $package; \
pip install --default-timeout=1000 $package; \
done;

COPY --chown=ray:users --exclude=model.py . .
Expand Down
32 changes: 16 additions & 16 deletions instill/helpers/ray_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ def construct_task_detection_output(
objects = []
for cat, sc, bb in zip(category, score, bbox):
bb_dict = {
"top": bb[1],
"left": bb[0],
"width": bb[2],
"height": bb[3],
"top": float(bb[1]),
"left": float(bb[0]),
"width": float(bb[2]),
"height": float(bb[3]),
}
objects.append(
{"category": str(cat), "score": float(sc), "bounding-box": bb_dict}
Expand Down Expand Up @@ -210,10 +210,10 @@ def construct_task_ocr_output(
objects = []
for txt, sc, bb in zip(text, score, bbox):
bb_dict = {
"top": bb[1],
"left": bb[0],
"width": bb[2],
"height": bb[3],
"top": float(bb[1]),
"left": float(bb[0]),
"width": float(bb[2]),
"height": float(bb[3]),
}
objects.append(
{"text": str(txt), "score": float(sc), "bounding-box": bb_dict}
Expand Down Expand Up @@ -264,10 +264,10 @@ def construct_task_instance_segmentation_output(
objects = []
for r, cat, sc, bb in zip(rle, category, score, bbox):
bb_dict = {
"top": bb[1],
"left": bb[0],
"width": bb[2],
"height": bb[3],
"top": float(bb[1]),
"left": float(bb[0]),
"width": float(bb[2]),
"height": float(bb[3]),
}
objects.append(
{
Expand Down Expand Up @@ -369,10 +369,10 @@ def construct_task_keypoint_output(
point_list.append({"x": kp[0], "y": kp[1], "v": kp[2]})

bb_dict = {
"top": bb[1],
"left": bb[0],
"width": bb[2],
"height": bb[3],
"top": float(bb[1]),
"left": float(bb[0]),
"width": float(bb[2]),
"height": float(bb[3]),
}
objects.append(
{"keypoints": point_list, "score": float(sc), "bounding-box": bb_dict}
Expand Down