Skip to content

Commit 7cc2821

Browse files
committed
rename image classification to object detection
1 parent 5081903 commit 7cc2821

File tree

15 files changed

+31
-31
lines changed

15 files changed

+31
-31
lines changed

client/src/Annotation/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default () => {
6969
const { toggleTheme, theme } = useTheme();
7070
const [settings, setSettings] = useState({
7171
taskDescription: "",
72-
taskChoice: "image_classification",
72+
taskChoice: "object_detection",
7373
images: [],
7474
showLab: false,
7575
mode: theme,

client/src/ConfigurationTask/ConfigurationTask.test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jest.mock("react-i18next", () => ({
1010
({
1111
"setup.tabs.taskinfo.task_info": "Task Information",
1212
"setup.tabs.taskinfo.task_choice": "Choice of Task",
13-
"setup.tabs.taskinfo.task_choice_classification":
14-
"Image Classification",
13+
"setup.tabs.taskinfo.task_choice_object_detection":
14+
"Object Detection",
1515
"setup.tabs.taskinfo.task_choice_segmentation": "Image Segmentation",
1616
})[key],
1717
}),
@@ -61,7 +61,7 @@ describe("ConfigurationTask", () => {
6161
title: "Task Choice",
6262
type: "radiogroup",
6363
choices: [
64-
{ value: "image_classification", text: "Image Classification" },
64+
{ value: "object_detection", text: "Object Detection" },
6565
{ value: "image_segmentation", text: "Image Segmentation" },
6666
],
6767
},
@@ -81,13 +81,13 @@ describe("ConfigurationTask", () => {
8181
expect(screen.getByText("Choice of Task")).toBeInTheDocument()
8282

8383
// Assert radio buttons are rendered
84-
const imageClassificationRadio = screen.getByTestId(
85-
`radio-taskChoice-image_classification`,
84+
const imageObjectDetectionRadio = screen.getByTestId(
85+
`radio-taskChoice-object_detection`,
8686
)
8787
const imageSegmentationRadio = screen.getByTestId(
8888
`radio-taskChoice-image_segmentation`,
8989
)
90-
expect(imageClassificationRadio).toBeInTheDocument()
90+
expect(imageObjectDetectionRadio).toBeInTheDocument()
9191
expect(imageSegmentationRadio).toBeInTheDocument()
9292

9393
// Simulate changing radio button and verify onChange is called

client/src/ConfigurationTask/index.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export default ({ config, onChange }) => {
2222
isRequired: true,
2323
choices: [
2424
{
25-
value: "image_classification",
26-
text: t("setup.tabs.taskinfo.task_choice_classification"),
25+
value: "object_detection",
26+
text: t("setup.tabs.taskinfo.task_choice_object_detection"),
2727
},
2828
{
2929
value: "image_segmentation",
@@ -42,7 +42,7 @@ export default ({ config, onChange }) => {
4242
taskChoice:
4343
config.taskChoice !== undefined
4444
? config.taskChoice
45-
: "image_classification",
45+
: "object_detection",
4646
},
4747
{ deep: true },
4848
),

client/src/ConfigureImageClassification/ConfigureImageClassification.test.js renamed to client/src/ConfigureObjectDetection/ConfigureObjectDetection.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react"
22
import { render, screen, fireEvent } from "@testing-library/react"
3-
import ConfigureImageClassification from "./index"
3+
import ConfigureObjectDetection from "./index"
44
import "@testing-library/jest-dom"
55

66
// Mock the useTranslation hook with actual translations
@@ -73,13 +73,13 @@ jest.mock("material-survey/components/Survey", () => ({
7373
)),
7474
}))
7575

76-
describe("ConfigureImageClassification", () => {
76+
describe("ConfigureObjectDetection", () => {
7777
test("renders form with questions and calls onChange on answer change", () => {
7878
const mockConfig = {}
7979
const mockOnChange = jest.fn()
8080

8181
render(
82-
<ConfigureImageClassification
82+
<ConfigureObjectDetection
8383
config={mockConfig}
8484
onChange={mockOnChange}
8585
/>,

client/src/Localization/translation-de-DE.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const translationDeDE = {
3434
"setup.tabs.images": "Bilder",
3535
"setup.tabs.taskinfo.task_info": "Aufgabeninformation",
3636
"setup.tabs.taskinfo.task_choice": "Aufgabenwahl",
37-
"setup.tabs.taskinfo.task_choice_classification": "Bildklassifikation",
37+
"setup.tabs.taskinfo.task_choice_object_detection": "Bildklassifikation",
3838
"setup.tabs.taskinfo.task_choice_segmentation": "Bildsegmentierung",
3939
"configuration.multiple_regions": "Können mehrere Regionen erstellt werden?",
4040
"configuration.multiple_region_labels": "Mehrere Regionslabels erlaubt?",
@@ -70,7 +70,7 @@ const translationDeDE = {
7070
helptext_circle: "Kreis hinzufügen",
7171
comment_placeholder: "Kommentar hier schreiben...",
7272
image_tags: "Bild-Tags",
73-
image_tags_classification_placeholder: "Bildklassifikation",
73+
image_tags_object_detection_placeholder: "Bildklassifikation",
7474
loading: "Laden...",
7575
note: "Hinweis",
7676
here: "hier",

client/src/Localization/translation-en-EN.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const translationEnEN = {
3434
"setup.tabs.images": "Images",
3535
"setup.tabs.taskinfo.task_info": "Task Information",
3636
"setup.tabs.taskinfo.task_choice": "Choice of Task",
37-
"setup.tabs.taskinfo.task_choice_classification": "Image Classification",
37+
"setup.tabs.taskinfo.task_choice_object_detection": "Object Detection",
3838
"setup.tabs.taskinfo.task_choice_segmentation": "Image Segmentation",
3939
"configuration.multiple_regions": "Can Multiple Regions Be Created?",
4040
"configuration.multiple_region_labels": "Multiple Region Labels Allowed?",
@@ -69,7 +69,7 @@ const translationEnEN = {
6969
auto_bounding_box_done: "Auto Bouding Box Selection Completed",
7070
comment_placeholder: "Write comment here...",
7171
image_tags: "Image Tags",
72-
image_tags_classification_placeholder: "Image Classification",
72+
image_tags_object_detection_placeholder: "Object Detection",
7373
loading: "Loading...",
7474
note: "Note",
7575
here: "here",

client/src/SettingsProvider/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const defaultSettings = {
99
wasdMode: true,
1010
settings: {
1111
taskDescription: "",
12-
taskChoice: "image_classification",
12+
taskChoice: "object_detection",
1313
images: [],
1414
showLab: false,
1515
lastSavedImageIndex: null,

client/src/SetupPage/SetupPage.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jest.mock("../SettingsProvider", () => ({
3030
}))
3131

3232
// Mock dependent components
33-
jest.mock("../ConfigureImageClassification", () =>
34-
jest.fn(() => <div data-testid="ConfigureImageClassification" />),
33+
jest.mock("../ConfigureObjectDetection", () =>
34+
jest.fn(() => <div data-testid="ConfigureObjectDetection" />),
3535
)
3636
jest.mock("../ConfigureImageSegmentation", () =>
3737
jest.fn(() => <div data-testid="ConfigureImageSegmentation" />),
@@ -53,7 +53,7 @@ describe("SetupPage", () => {
5353
taskDescription: "",
5454
configuration: { labels: [] },
5555
images: [],
56-
taskChoice: "image_classification",
56+
taskChoice: "object_detection",
5757
}
5858
const mockSetConfiguration = jest.fn()
5959
const mockSetShowLabel = jest.fn()

client/src/SetupPage/index.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import CardContent from "@mui/material/CardContent"
1212
import Typography from "@mui/material/Typography"
1313
import IconButton from "@mui/material/IconButton"
1414
import PropTypes from "prop-types"
15-
import ConfigureImageClassification from "../ConfigureImageClassification"
15+
import ConfigureObjectDetection from "../ConfigureObjectDetection"
1616
import ConfigureImageSegmentation from "../ConfigureImageSegmentation"
1717
import Button from "@mui/material/Button"
1818
import ConfigurationTask from "../ConfigurationTask"
@@ -274,9 +274,9 @@ export const SetupPage = ({
274274

275275
{currentTab === "configure" && (
276276
<Box minWidth="55vw" paddingTop={"1rem"}>
277-
{settings.taskChoice === "image_classification" && (
277+
{settings.taskChoice === "object_detection" && (
278278
<>
279-
<ConfigureImageClassification
279+
<ConfigureObjectDetection
280280
config={settings.configuration}
281281
onChange={updateConfiguration}
282282
/>

client/src/TagsSidebarBox/TagsSidebarBox.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jest.mock("react-i18next", () => ({
99
t: (key) =>
1010
({
1111
image_tags: "Image Tags",
12-
image_tags_classification_placeholder: "Image Classification",
12+
image_tags_object_detection_placeholder: "Object Detection",
1313
})[key],
1414
}),
1515
}))
@@ -38,7 +38,7 @@ describe("TagsSidebarBox", () => {
3838
/>,
3939
)
4040

41-
it("renders correctly with image classification and tags", () => {
41+
it("renders correctly with object detection and tags", () => {
4242
renderComponent()
4343
// Check if title is rendered
4444
expect(screen.getByText("Image Tags")).toBeInTheDocument()

client/src/TagsSidebarBox/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const TagsSidebarBox = ({
5454
{imageClsList.length > 0 && (
5555
<div style={{ padding: 8 }}>
5656
<Select
57-
placeholder={t("image_tags_classification_placeholder")}
57+
placeholder={t("image_tags_object_detection_placeholder")}
5858
onChange={onChangeClassification}
5959
value={selectValue}
6060
options={memoImgClsList}

server/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
default_settings = {
5454
"taskDescription": "",
55-
"taskChoice": "image_classification",
55+
"taskChoice": "object_detection",
5656
"images": [],
5757
"showLab": False,
5858
"mode": "light",

server/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"taskDescription": "",
3-
"taskChoice": "image_classification",
3+
"taskChoice": "object_detection",
44
"images": [],
5-
"showLab": true,
5+
"showLab": false,
66
"mode": "light",
77
"lastSavedImageIndex": null,
88
"configuration": {

server/tests/test_app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_get_initial_settings(self):
3535
self.assertEqual(response.status_code, 200)
3636
data = json.loads(response.data)
3737
self.assertEqual(data["taskDescription"], "")
38-
self.assertEqual(data["taskChoice"], "image_classification")
38+
self.assertEqual(data["taskChoice"], "object_detection")
3939

4040
def test_update_settings(self):
4141
updated_settings = {

0 commit comments

Comments
 (0)